A personal repository of random information in compensation for a fatigued biological computer
Breaded IT » Web Development » SilverStripe CMS pre V3.0 » Silverstripe 2.2.x Notes » Paypal donate example
14 August 2007 at 5:31pm
Alternatively, you can do this:
In Page_Controller class, add this:
function PayPalForm() {
return 'replace me with paypal form html here!';
}
It just string replaces $Paypal with the HTML of the PayPal html. It works for anything really, including adverts if you wanted to throw them straight into the content (separate from the templates). Ideally it's good for little 'snippets' of external html or javascript.
$PayPalForm can be called in the templates, as well as in the content editor (WYSIYWG editor in the SS CMS).
Hope this helps!
Sean
Last edited: 14 August 2007 at 5:37pm