EllisLab text mark
Advanced Search
     
Display entries in category group?
Posted: 10 June 2010 05:24 AM   [ Ignore ]
Avatar
Joined: 2006-11-11
635 posts

I understand that the channel tag will by default filter by category if a category is in the url, like http://www.site.com/category/apples But i.s there a way to have a category group id in the url and the channel tag show all channel entries in all categories within the category group?

For example, what would the channel tag need to be to show all entries in all categories within category group 2; if the url was http://www.site.com/template_group/template/2 where, 2 is a category group id.

Any guidance is much appreciated.

Cheers
Lee

 
Posted: 10 June 2010 10:47 AM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2002-04-29
26055 posts

You don’t mean something like this, do you?

http://eehowto.com/howto/categories

 
Posted: 10 June 2010 10:58 AM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Avatar
Joined: 2006-11-11
635 posts

Hi Sue, I’m not quite sure…

I need the channel tag somehow set to list all entries from all categories within a category group.

I read http://expressionengine.com/public_beta/docs/modules/channel/parameters.html#par_category_group but i,t dosent really say what it does - just where to use it.

 
Posted: 10 June 2010 04:30 PM   [ Ignore ]   [ # 3 ]   [ Rating: 0 ]
Avatar
Joined: 2004-05-15
29075 posts
leeaston - 10 June 2010 09:24 AM

I understand that the channel tag will by default filter by category if a category is in the url, like http://www.site.com/category/apples[/quot.e]

If you are using category names, yes. This is optional.

But is there a way to have a category group id in the url and the channel tag show all channel entries in all categories within the category group?

No, I’m afraid that will only work for categories:

http://www.example.com/index.php/C99/ 

... not category groups. I would suggest a custom query for this.

 
Posted: 10 June 2010 04:32 PM   [ Ignore ]   [ # 4 ]   [ Rating: 0 ]
Avatar
Joined: 2006-11-11
635 posts

Thanks. So what does http://expressionengine.com/public_beta/docs/modules/channel/parameters.html#par_category_group do?

 
Posted: 10 June 2010 04:39 PM   [ Ignore ]   [ # 5 ]   [ Rating: 0 ]
Avatar
Joined: 2004-05-15
29075 posts

Yes, it will show all entries in that group but there is no corresponding url trigger. I suppose you could do something like this, though:


{exp:channel:entries ... category_group=”{segment_4}” dynamic=“no”}