14 July 2010 at 7:12pm
If you want to control content from another page you can use the <% control Page(url-of-your-page %>.... $Title ... <% end_control %> which will control over the page object with the given URL. If control Page() doesn't work then you will have to write a PHP function to render the template inside the page (see documentation about renderWith()). Also you can only use <% include %> to get templates from the includes folder (not from layout folder).
14 July 2010 at 9:12pm
"How can I show my $_return_article variable in Page.ss template?"
ArticlePage extends Page so templatePhp() does not exist per se in Page.ss.
- You can call templatePhp() with $templatePhp in ArticlePage.ss if you want to.
- Or use <% control Page(url-of-your-page) %>$templatePhp<% end_control %> or <% if ClassName = ArticlePage %>$templatePhp<% end_if %> in Page.ss.
- Or create a wrapper method in Page.php for ArticlePage.php (or move templatePhp() to Page.php of course)