PDA

View Full Version : How add category in right box


Besfort
07-02-2009, 10:02 PM
how to add category in right box for example this http://rinia-ks.net/cat.JPG




sorry for my bad english im from kosova

millkins
07-03-2009, 08:47 AM
You need to make a simple module box_article_list and set the parameter on it to search in the desired category


<vte:param name="search_cid" value="5" />

Just place the id of your category
So it should look something like this



<vte:box module="box_article_list">
<vte:params>
<vte:param name="search_cid" value="2" />
<vte:param name="search_sort_by" value="created" />
<vte:param name="search_order" value="descending" />
<vte:param name="search_limit" value="5" />
</vte:params>
<vte:template>
<div id="box_category" class="box">
<div class="box_title_holder"><div class="box_title">NAME OF CATEGORY</div></div>
<div class="box_body">
<div class="box_content">
<ul>
<vte:foreach item = "article" from = "{article_list}">
<li>
<a href="{article.get_href}">
<vte:value select="{article.get_title}" />
</a>
</li>
</vte:foreach>
</ul>
</div>
</div>
</div>
</vte:template>
</vte:box>


You can save it to templates/box folder as a .tpl file and include it to homepage/default.tpl

tranat
10-03-2009, 06:13 PM
Thanks, Millkins. It works well, I can add categories with the names of persons (and other information about each of them).
But how to display their photos on the left of each line, like http://rinia-ks.net/cat.JPG ? (I tried many manners to add photos, but cannot do that).