Forum for discussing general topics related to Couch.
3 posts Page 1 of 1
This is probably a very simple problem but I cannot figure it out.

I want to use
Code: Select all
<cms:pages />

to output all of the pages that were created before and including today.

When I use
Code: Select all
<cms:pages masterpage="..." stop_before="<cms:date format='Y-m-d' />"

it will not display today.

My question is, how to I increase
Code: Select all
<cms:date format='Y-m-d' />

by one day such that I display everything up to and including today?
Hi,

output all of the pages that were created before and including today.
The cms:pages, by default, does not show pages that fall beyond today. So you really shouldn't need to do anything extra to do what you mentioned.

For manipulating the dates in special cases, I think you should find the following thread useful-
viewtopic.php?f=8&t=8316

Hope it helps.
Perfect. As always, the answer is both forthcoming and simple to implement.

If it helps anyone else then my solution was

Code: Select all
<cms:php>
    global $CTX;
    $tomorrow = strtotime("tomorrow");
    $CTX->set ( 'tomorrow', date('Y-m-d', $tomorrow), 'global' );
</cms:php>

<cms:pages masterpage='...' stop_before="<cms:show tomorrow />">
...
</cms:pages>


Many thanks.
3 posts Page 1 of 1
cron