Hello everyone,
What can I say... Parameter remember=' ' is just another idea to feed my CouchCMS addiction. As example let's see a sketchy code -
If all memos get recorded to an occasional variable (perhaps, named k_remember), I'd list memos to get roughly reminded i.e.
I scratch head over making list with children, hierarchical...
remember = 'This post is about nothing serious, yet..'
What can I say... Parameter remember=' ' is just another idea to feed my CouchCMS addiction. As example let's see a sketchy code -
- Code: Select all
<cms:set has_total_pages = "<cms:pages count_only='1' remember='Count total number of existing published pages in template'/>" />
<cms:test remember=has_total_pages />
<cms:if has_total_pages ge '10'><cms:else/><cms:ignore>
/**
* Template with 10 cloned pages.
* Created / added up to 10, if necessary.
*/
</cms:ignore>
<cms:repeat startcount='1' count="<cms:sub '10' has_total_pages remember='Calc number of missing pages'/>" remember='Repeat as many times as the number of missing pages [up to 10]:'>
<cms:db_persist _mode='create' _masterpage=k_template_name k_page_title="<cms:call 'random_name' count='8' />" remember="#<cms:show k_count /> page created in this template"/>
</cms:repeat>
</cms:if>
If all memos get recorded to an occasional variable (perhaps, named k_remember), I'd list memos to get roughly reminded i.e.
- Code: Select all
<cms:test ignore='0'>
<cms:call 'array2list' k_remember html_key='' list='ol' />
</cms:test>
- Count total number of existing published pages in template
- 7
- Calc number of missing pages
- Repeat as many times as the number of missing pages [up to 10]:
- #1 page created in this template
- #2 page created in this template
- #3 page created in this template
I scratch head over making list with children, hierarchical...