Hi all,
I'm tryng to figure out how to modify the list_view of a template depending on the number of cloned pages.
the above only gets the updated page_count when the template is refreshed.
i've scoured the forums/docs but have been unable to find anything, although it often turns out that i'm just rubbish at searching.
Also wondered if the following might work
but couldn't even figure out how to nest the tags properly (tho i run into this quite often!)
I'm sure I'm just missing something obvious, but missing it I am.
Any pointers appreciated.
I'm tryng to figure out how to modify the list_view of a template depending on the number of cloned pages.
- Code: Select all
<cms:template title='Dev Dummy' clonable='1' executable='0' order='15' parent='dev' dynamic_folders='1'>
<cms:set page_count="<cms:pages count_only='1' show_unpublished='1' show_future_entries='1' />" scope='global' />
<cms:if page_count lt '5'>
<cms:config_list_view>
<cms:html><h1>less than</h1></cms:html>
</cms:config_list_view>
<cms:else />
<cms:config_list_view>
<cms:html><h1>less than</h1></cms:html>
</cms:config_list_view>
</cms:if>
<cms:editable type='richtext' name='content'>Hello</cms:editable>
</cms:template>
the above only gets the updated page_count when the template is refreshed.
i've scoured the forums/docs but have been unable to find anything, although it often turns out that i'm just rubbish at searching.
Also wondered if the following might work
- Code: Select all
<cms:if "<cms:if k_route_name eq 'list_view'><cms:show "<cms:pages count_only='1' show_unpublished='1' show_future_entries='1' />" ></cms:if>" lt '5'>
<cms:config_list_view>
<cms:html><h1>less than</h1></cms:html>
</cms:config_list_view>
<cms:else />
<cms:config_list_view>
<cms:html><h1>less than</h1></cms:html>
</cms:config_list_view>
</cms:if>
but couldn't even figure out how to nest the tags properly (tho i run into this quite often!)
I'm sure I'm just missing something obvious, but missing it I am.
Any pointers appreciated.