Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1
Hi,

I'm super new to your cms (which is great so far!) and I've run into an issue I don't know how to solve for. Basically, I've got a template named book.php that is clonable. I don't plan on making book.php a list view, I'd much rather default it to the latest page created using the template. How can I make that happen?
Hi,

You can do so by simply ignoring (that is not checking for) which view the template is being displayed under.

Use the following (skeletal) code, for example -
Code: Select all
<cms:pages masterpage='book.php' limit='1'>
   ...your HTML code here can access all the values of the latet page..
</cms:pages>

In the code above we are making the 'pages' tag fetch in the latest cloned page of book.php (limit='1'). Since we have not wrapped the code within any 'if k_is_page' etc. conditional logic that checks for the current view, it will get executed in all the views.

Hope this helps. Do let me know.
2 posts Page 1 of 1