Forum for discussing general topics related to Couch.
4 posts Page 1 of 1
Please how do I display the folders in the sidebar breaking the <ul> from a certain number.

EX:

Categorias

Category Name | Category Name
Category Name | Category Name
Category Name | Category Name
Category Name | Category Name


I'm using simple code to the side

<ul class="sidebar">
<cms:folders masterpage='comunicado.php'>
<li><a href="<cms:show k_folder_link />"><p class="w-clearfix sidebar-list-item"><cms:show k_folder_title /><span class="number-end-row">(<cms:show k_folder_totalpagecount />)</span>
</p></a></li>
</cms:folders>
</ul>
Hi and welcome :)

I assume you are using v1.4.7.
If you could upgrade to v2.0 (available from viewtopic.php?f=5&t=10241), you can then use the 'paginate', 'limit', 'offset', 'startcount' parameters with <cms:folders> exactly the way we so do with <cms:pages> tag (for details of which which please see http://docs.couchcms.com/concepts/pagination.html).

You may then use the pagination related variables e.g. k_count, k_record_from etc. (as shown in the last link above) to display the folders as you wish.

Example code -
Code: Select all
<cms:folders
    masterpage = 'comunicado.php'
    hierarchical = '1'
    paginate = '1'
    limit = '10'
>
...
</cms:folders>


Hope it helps.
Thanks, I solved using css

Code: Select all
ul.sidebar li {
  display:block;
  list-style-type: none;
  margin:0;
  height:25%;               
}

ul.sidebar li:nth-child(odd) {
  clear:both;             
  float:left;               
  width:50%;                 
}


If you have another resolution please post!
Ok, so I think I did not properly understand the problem :) Sorry for the overly complicated solution I posted.
Using CSS would be the perfect way of handling this kind of display.
4 posts Page 1 of 1