Hi,
I have a clonable page called 'projects'.
Each one of this clonable pages must be on one of two category: "finished" or "ongoing". This is chosen trough a dropdown.
I need to output each group of four projects inside a <li></li>. A quick example:
Below I'm also giving a example on how I was trying to pull the information. Example for 'FINISHED' :
And repeated this for multiple possibilities of course.
Question is: is there any way for me to do a k_count in order: 1, 2, 3, 4, 5 … but for each separate category?
I get a lot of gaps and unwanted results of course because k_count ouputs ALL 'projects' by numeric order and not just the ones inside a category.
I hope it's clear and really sorry for the huge post.
Couch rocks <3
Thank you so much.
F
I have a clonable page called 'projects'.
Each one of this clonable pages must be on one of two category: "finished" or "ongoing". This is chosen trough a dropdown.
I need to output each group of four projects inside a <li></li>. A quick example:
- Code: Select all
<h2>FINISHED</h2>
<ul>
<li>project 1</li>
<li>project 3</li>
<li>project 5</li>
<li>project 7</li>
</ul>
<ul>
<li>project 9</li>
<li>project 11</li>
<li>project 12</li>
<li>project 13</li>
</ul>
etc…
- Code: Select all
<h2>ON GOING</h2>
<ul>
<li>project 2</li>
<li>project 4</li>
<li>project 6</li>
<li>project 8</li>
</ul>
<ul>
<li>project 10</li>
<li>project 12</li>
<li>project 14</li>
<li>project 16</li>
</ul>
etc…
Below I'm also giving a example on how I was trying to pull the information. Example for 'FINISHED' :
- Code: Select all
<cms:pages masterpage='projects.php' orderby='weight' order='asc'>
<cms:if (category == 'FINISHED') && (k_count == '1') > <ul class="clearfix"> </cms:if>
</cms:pages>
<cms:pages masterpage='projects.php' orderby='weight' order='asc'>
<cms:if (category == 'FINISHED') && (k_count == '1') ><li><cms:show project_name /></li></cms:if>
<cms:if (category == 'FINISHED') && (k_count == '2') ><li><cms:show project_name /></li></cms:if>
<cms:if (category == 'FINISHED') && (k_count == '3') ><li><cms:show project_name /></li></cms:if>
<cms:if (category == 'FINISHED') && (k_count == '4') ><li><cms:show project_name /></li></cms:if>
</cms:pages>
<cms:pages masterpage='projects.php' orderby='weight' order='asc'>
<cms:if (category == 'FINISHED') && (k_count == '1') > </ul> </cms:if>
</cms:pages>
And repeated this for multiple possibilities of course.
Question is: is there any way for me to do a k_count in order: 1, 2, 3, 4, 5 … but for each separate category?
I get a lot of gaps and unwanted results of course because k_count ouputs ALL 'projects' by numeric order and not just the ones inside a category.
I hope it's clear and really sorry for the huge post.
Couch rocks <3
Thank you so much.
F