EllisLab text mark
Advanced Search
     
Not Understanding How Low Seg2Cat Works
Posted: 02 July 2010 02:44 PM   [ Ignore ]
Joined: 2003-12-22
210 posts

Friends:

I’m having a really difficult time understanding how the Low Seg2Cat extension is supposed to work, am I’m hoping someone can help me.

I’m trying to use a url like this:

    http://www.anydomain.com/index.php/weblog/news/category1/

so that it shows all of the entries in category1 (the category name).

Here is the code I’m using in the “news” template to show the entries:

{exp:weblog:entries weblog="news" category="{segment_3_category_name}" sort="desc" limit="10"}
{title}
<br />
{body}
{
/exp:weblog:entries} 

But that results in no entries being listed at all.

I’m sure I’m doing something really dumb, but I can’t figure out what it might be. smile

Can someone help?

Thanks in advance,

Frank

 
Posted: 02 July 2010 03:53 PM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2006-09-06
513 posts

For category you need an ID, not name. So try:

{exp:weblog:entries weblog="news" category="{segment_3_category_id}" sort="desc" limit="10"}
{title}
<br />
{body}
{
/exp:weblog:entries} 
 Signature 

Kyle Summer | smartpill design | New Haven, CT |  twitter

 
Posted: 02 July 2010 04:24 PM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Joined: 2003-12-22
210 posts

Thanks Kyle. I was right - I was doing something really dumb. I knew the tag needed the category ID (rather than the name), but I was dense. <grin>