Hello! Could I please clarify what amounts to a "change" in the Admin Panel i.e. something that will trigger Couch to serve a fresh version of a page rather than the cached version. In particular with reference to using an editable region as part of the cms:pages selection criteria.
Say, for a news page I want to split the news items in 2 lists - by a cutoff date - so recent and old news.
I could create a cloned template news-items.php and have news_cutoff in globals.php and have the following code inside news-items.php:
<cms:pages masterpage='news-items.php' order='desc' start_on=news_cutoff >
<cms:pages masterpage='news-items.php' order='desc' stop_before=news_cutoff >
If the client changes news_cutoff I am assuming that this will not amount to a "change" and the cached page will be served.
If I create another template - news.php - non-cloneable - with news_cutoff inside this template and insert the cms:pages tags inside this template - I am guessing that an alteration to news_cutoff will amount to a "change" and Couch will serve a fresh version of the page.
I'm thinking therefore that although it is neat to have site-wide bits & pieces in globals.php it is best not to use globals.php for setting up selection criteria for cloned pages - because the listing won't reflect a change in the criteria. That is if we want to use cache wherever possible.
p.s. Apologies because I realise I could test this all out for myself but I don't currently have a suitable setup available. Sorry! Hopefully someone else will find it useful.
Say, for a news page I want to split the news items in 2 lists - by a cutoff date - so recent and old news.
I could create a cloned template news-items.php and have news_cutoff in globals.php and have the following code inside news-items.php:
<cms:pages masterpage='news-items.php' order='desc' start_on=news_cutoff >
<cms:pages masterpage='news-items.php' order='desc' stop_before=news_cutoff >
If the client changes news_cutoff I am assuming that this will not amount to a "change" and the cached page will be served.
If I create another template - news.php - non-cloneable - with news_cutoff inside this template and insert the cms:pages tags inside this template - I am guessing that an alteration to news_cutoff will amount to a "change" and Couch will serve a fresh version of the page.
I'm thinking therefore that although it is neat to have site-wide bits & pieces in globals.php it is best not to use globals.php for setting up selection criteria for cloned pages - because the listing won't reflect a change in the criteria. That is if we want to use cache wherever possible.
p.s. Apologies because I realise I could test this all out for myself but I don't currently have a suitable setup available. Sorry! Hopefully someone else will find it useful.