I want to have 6 different paypal buttons throughout my website. Currently I have the following code in my page.php file.
function Content() {
$tmp = str_replace('$PayPal1', $this->PayPal1(), $this->Content);
return str_replace('$PayPal2', $this->PayPal2(), $tmp);
}
function PayPal1() {
return '<...paypal form code...>';
}
function PayPal2() {
return '<...paypal form code...>';
}
It works fine for 2 buttons... but how do i change it so that it I can display 6. I've been mucking around with all the scripting but can't get it to work... I'm still getting used to the logic, definitions and coding of Silverstripe. :)
Thanks in advance.