Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-06-16 22:00:46

shaza
Member
Registered: 2006-10-31
Posts: 20

Category if_individual article?

Basically I have a section and then there is subnavigation by categories. I use if_category to have the subnavigation for permalinks to the actual articles.

But here is the problem:

I just want to show on the top the list of articles within the same category as that article. That would be in the individual article page. So basically on top of the individual article I want the same links of articles to show within the same category as that article. Like its showing in if_category

This is what I have:

<txp:if_article_list>
<txp:glx_if_section_frontpage>
<txp:image id=“3” class=“right” />
<h1>Products</h1>
<p>Every business or company has their own goals. We cater to your goals by providing a wide variety of services that can be implemented in your marketing or website initiatives.
</p>
</txp:glx_if_section_frontpage>
</txp:if_article_list>

<!— CATEGORY LISTING —>

<txp:if_category>
<div id=“sidebox-grey”><ul>
<txp:article limit=“50” form=“excerpt_product” />
</ul></div>
<txp:article limit=“1” status=“sticky” />
</txp:if_category>

<!— END CATEGORY LISTING —>

<txp:if_individual_article>
<div id=“sidebox-subtop”><ul>
<txp:article_custom limit=“50” form=“excerpt_product” section=“products” />
</ul></div>
<div class=“clear”></div>
<txp:article limit=“1” />
<div align=“right”>
<b>Related: </b><txp:link_to_prev><txp:prev_title /></txp:link_to_prev> <b>:</b> <txp:link_to_next> <txp:next_title /> </txp:link_to_next>
</div>
</txp:if_individual_article>

Offline

#2 2009-06-16 22:05:15

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Category if_individual article?

shaza wrote:

I just want to show on the top the list of articles within the same category as that article. That would be in the individual article page.

This is exactly what the related_articles tag does.


Code is topiary

Offline

Board footer

Powered by FluxBB