All my page types extend Page. In Page.php I have the following function:
function testMe() {
return "Testing 123";
}
In my template, I call it as follows:
$TestMe
<% loop $Parent.Children %>
$TestMe
<% end_loop %>
However, it is not called from inside the loop even though the parent and all its children inherit from the Page class. Ugh!
I assume it has something to do with the current scope and that I need to put the function elsewhere. But I am unsure where it should go.
Any help would be appreciated.