You are viewing the PKP Support Forum | PKP Home Wiki

Creating New Dynamic Pages

OCS development discussion, enhancement requests, third-party patches and plug-ins.

Moderators: jmacgreg, michael

Forum rules
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

Creating New Dynamic Pages

Postby BVBAccelerate » Wed Sep 28, 2011 11:54 am

Hey Everyone,

I have developed a payment plugin that allows people to pay either using their credit card or offline. I would like to add a feature to this so that if people have chosen to pay offline, they are brought to a page with a link to print out their offline payment form. I have everything set up and working except for I don't know how to create a new dynamic page in this system.

I'm familiar with MVC, and was figuring that maybe sections of the URL were directing the system on which function to use in the plugin's class, but I haven't been able to get it to work. I know that my class is extending the PaymethodPlugin class, so does this mean it only has the capability to display certain pages (settings page, payment form page, confirmation page), or can I write something in my plugin to extend its functionality to include an offline payment form based on the queued payment ID?

Please let me know, thanks!
Posts: 33
Joined: Mon Apr 19, 2010 2:01 pm

Re: Creating New Dynamic Pages

Postby michael » Thu Sep 29, 2011 8:16 pm

Hi BVBAccelerate,

You could add the new page display to the handle method in your main plugin class. You'll need to define a new operation for this, e.g. 'print', and create a corresponding plugin template that you want to use for the display.

Please have a look at the handle method in both the ManualPaymentPlugin and the PayPalPlugin to get a detailed sense of how this can be done.

Posts: 409
Joined: Thu Mar 29, 2007 2:09 pm

Return to OCS Development

Who is online

Users browsing this forum: Google [Bot] and 0 guests