Pls, visit http://www.mercatornet.com/new/index/ , we included different categories with as menu and drop-down menu. We want to show list of articles for each category menus clicked, can you Pls, guide me how we can do such?
Regards
Debasish
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
March 18, 2011 6:58am
Subscribe [2]#1 / Mar 18, 2011 6:58am
Pls, visit http://www.mercatornet.com/new/index/ , we included different categories with as menu and drop-down menu. We want to show list of articles for each category menus clicked, can you Pls, guide me how we can do such?
Regards
Debasish
#2 / Mar 18, 2011 3:33pm
Hi, Debasish.
I create a template called archives that lists items by their category.
Here’s the first part of the code:
{exp:channel:categories channel="howto" show_empty="no" style="linear"}
<li><a href="http://{path=howto/archives}">{category_name}</a></li>
{/exp:channel:categories}Then I have the following code in howto/archives:
{exp:channel:entries channel="howto" orderby="date" sort="desc" limit="100" disable="pagination|custom_fields|categories|member_data"}
{date_heading display="yearly"}
<h2 class="title">{entry_date format="%Y"}</h2>
{/date_heading}
{date_heading display="monthly"}
<h3 class="date">{entry_date format="%F"}</h3>
{/date_heading}
<ul>
<li><a href="http://{title_permalink=">{title}</a></li>
</ul>
{/exp:channel:entries}If you visit http://eehowto.com and click on HowTo in the right nav, you’ll see what it looks like. Pay no attention to the items in the left nav - haven’t gotten around to fiddling with removing the default code from the template.