I’m following a basic tutorial from the MODx Web Development book (chapter 11), and it’s just not working - could someone have a quick look and tell me why?
Snippet name: helloworld! (there is actually an error in the book here)
Snippet code:
<?php
$MODx->setPlaceholder("message1", "Hello World!");
$MODx->setPlaceholder("message2","It is a beautiful day");
return;
?>
Document content:
[!helloworld!]
Before Placeholder1 <br>
[+message1+] <br>
Before Placeholder2 <br>
[+message2+]
Should all be pretty simple really, shouldn’t it?
Please note that the snippet call in the book uses single brackets - I have also tried double brackets. I have also tried using single quotes in place of the double ones.
I have refreshed page, cleared cache in both MODx and browser.
Any help would be really appreciated.