Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-04-27 23:56:22

marvix
Member
Registered: 2006-04-06
Posts: 27

How to list a category content without the name ?!

Hi ..

I have about 42 category in 1 section, and I need to list or show the content of those categories … I know this :

<code>
<txp:if_article_category name=“yourcategory” number=“1”>
<ul>
<txp:article_custom form=“sub” category=“yourcategory” sortby=“Posted” sortdir=“asc” />
</ul>
</txp:if_article_category>
</code>

But .. I need to make this for all categories … any thing better … auto listing .. taking the name from the url ?!

Thanks in advanced.

Offline

#2 2006-04-28 01:28:27

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: How to list a category content without the name ?!

Marvix,
You’ll want to get someone to help you with this one, as I did, but I think this moves toward your answer.

<code>
<txp:php>
global $thisarticle;

echo article_custom(array( ‘section’ => $thisarticle[‘section’], ‘category’ => $thisarticle[‘category1’], ‘limit’ => 100, ‘form’ => ‘sub’
));
</txp:php>
</code>

Hope it helps,

Matthew


Offline

#3 2006-04-28 02:04:20

marvix
Member
Registered: 2006-04-06
Posts: 27

Re: How to list a category content without the name ?!

Thank Matthew !

I found also nice plugin .. chh_article_custom !

In your code above .. what if i wanna check cat1 or cat2 .. how ?

Offline

#4 2006-04-28 03:10:49

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: How to list a category content without the name ?!

Marvix,
I’m not a php fella, though I wish I was,
You might be able to do something like this, but GET SOMEONE ELSE’s OPINION FIRST!
<code>
<txp:php>
global $thisarticle;

echo article_custom(array(
‘section’ => $thisarticle[‘section’],
‘category’ => $thisarticle[‘category1’],
‘category’ => $thisarticle[‘category2’],
‘limit’ => 100,
‘form’ => ‘sub’
));
</txp:php>
</code>


Offline

Board footer

Powered by FluxBB