Hey,
I'm trying to list all the pages from the template services.php.
On the services_list.html snippet, which I'm including using
This is working just fine, when there are an even number of pages, but I was wondering whether the would be a way of checking whether or not I'd be able to check whether the number of pages is odd or even before running the cms:pages tag. For example:
I've looked at the documentation and I couldn't find anything to check whether or not a masterpage has an odd or even number of pages.
Any help would be great.
I'm trying to list all the pages from the template services.php.
On the services_list.html snippet, which I'm including using
- Code: Select all
<cms:embed "services_list.html
- Code: Select all
<cms:pages order="asc" orderby="k_page_title" masterpage="services.php"></cms:pages>
This is working just fine, when there are an even number of pages, but I was wondering whether the would be a way of checking whether or not I'd be able to check whether the number of pages is odd or even before running the cms:pages tag. For example:
- Code: Select all
<cms:if masterpage="service.php" page_count="odd">
<ul class="boxes odd">
<cms:pages order="asc" orderby="k_page_title" masterpage="services.php">
<li class="box"><cms:show k_page_title /></li>
</cms:pages>
</ul>
<cms:else />
<ul class="boxes even">
<cms:pages order="asc" orderby="k_page_title" masterpage="services.php">
<li class="box"><cms:show k_page_title /></li>
</cms:pages>
</ul>
</cms:if>
I've looked at the documentation and I couldn't find anything to check whether or not a masterpage has an odd or even number of pages.
Any help would be great.