Hello, and thank you for all the effort you are putting in this great CMS.
I'm thinking to build up a special list view where posts do not look the same. So I need special classes for each post. Lets say I want 9 different posts. After the 9th it is repeating the classes so the 10th post should look like the 1st.
I came up with a solution when there is a limit of posts given. So lets say we have a limit of 18 posts per page, I can write:
But I guess this method is not the best solution, and what if there is no limit of posts or the limit is changing. Any Ideas for a smarter version of my idea? I need something which is repeating between 7 and 9 posts.
Thank you very much
I'm thinking to build up a special list view where posts do not look the same. So I need special classes for each post. Lets say I want 9 different posts. After the 9th it is repeating the classes so the 10th post should look like the 1st.
I came up with a solution when there is a limit of posts given. So lets say we have a limit of 18 posts per page, I can write:
- Code: Select all
<div class=" post
<cms:if "k_count=1 || k_count=10"> first_class </cms:if>
<cms:if "k_count=2 || k_count=11"> second_class </cms:if>
<cms:if "k_count=3 || k_count=12"> third_class </cms:if>
...
<cms:if "k_count=9 || k_count=18"> ninth_class </cms:if> ">
</div>
But I guess this method is not the best solution, and what if there is no limit of posts or the limit is changing. Any Ideas for a smarter version of my idea? I need something which is repeating between 7 and 9 posts.
Thank you very much