Category parameter not working consistently
Posted: 01 July 2008 07:02 PM   [ Ignore ]  
Lab Assistant
RankRank
Total Posts:  128
Joined  03-24-2008

http://posner.bonfx.com

At the bottom of the page, I have a weblog tag configured like so:

{exp:weblog:entries weblog="ideas_blog" category_group="1" limit="3"}
<div id="featured-content-left">
    <
p>{title}<br>{body}</p>
</
div>
{/exp:weblog:entries}

This works fine. When I add the second blog like this, it works fine:

{exp:weblog:entries weblog="ideas_blog|personal_blog" category_group="1" limit="3"}
<div id="featured-content-left">
    <
p>{title}<br>{body}</p>
</
div>
{/exp:weblog:entries}

When I change the category_group to “22” it stops working, though category 22 is valid.

When I add another category_group “24”, it still doesn’t work:

{exp:weblog:entries weblog="ideas_blog|personal_blog" category_group="22|24" limit="3"}
<div id="featured-content-left">
    <
p>{title}<br>{body}</p>
</
div>
{/exp:weblog:entries

}

ID 22 is from one category grouping and ID 24 is from another. In neither case, does the output work, though both categories are valid:

http://posner.bonfx.com/index.php/posner/blog_main/C22/
http://posner.bonfx.com/index.php/posner/blog_personal/C24/


What am I doing wrong that I can’t filter my weblog:entries output by these category IDs?

Thanks,

Doug

Profile
 
 
Posted: 01 July 2008 07:10 PM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  12433
Joined  04-29-2002

Hi, Doug. I doubt you have 24 category groups, that’s different from a category_id of 22 or 24.

If you get rid of category_group altogether, and let EE pass the category_id via the URL, does that work?

 Signature 

Quick Reference - EE Trial Options - EE Wiki - Docs for updating a build

Profile
MSG
 
 
Posted: 01 July 2008 07:26 PM   [ Ignore ]   [ # 2 ]  
Lab Assistant
RankRank
Total Posts:  128
Joined  03-24-2008

Hmmm….I changed “category_group” to “category_id” and it worked!

{exp:weblog:entries weblog="ideas_blog|personal_blog" category_id="22|24" limit="3"}
<div id="featured-content-left">
    <
p>{title}<br>{body}</p>
</
div>
{/exp:weblog:entries}

But…

If you read here, it says nothing about category_id as a parameter, but only as a variable. Should it be working??:

http://expressionengine.com/docs/modules/weblog/categories.html

Either way, I got it working! Thanks for pointing me in the right direction!!

Doug

Profile
 
 
Posted: 02 July 2008 08:43 AM   [ Ignore ]   [ # 3 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23547
Joined  05-20-2002

Yea, the parameter should be category- I thought if you put the id bit in there it was ignored.  Hm- does it work using category instead?  If so, I’d go with that.

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 02 July 2008 08:53 AM   [ Ignore ]   [ # 4 ]  
Lab Assistant
RankRank
Total Posts:  128
Joined  03-24-2008

It’s working right now with “category_id” as a weblog paramater, not as a variable inside the weblog tag. The docs show it as a variable at the link above.

Is “category_id” referenced anywhere in the documentation as a weblog parameter? Is this just a documentation gaffe?

Profile
 
 
Posted: 02 July 2008 09:01 AM   [ Ignore ]   [ # 5 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23547
Joined  05-20-2002

It’s not a weblog tag parameter as far as I know.  And I think I had one the other day where it caused an error- basically, the parameter was ignored.  Does it work if you change the parameter name to category?

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 02 July 2008 09:07 AM   [ Ignore ]   [ # 6 ]  
Lab Assistant
RankRank
Total Posts:  128
Joined  03-24-2008

I just tried changing it to “category=” from “category_id=” and it still works!

{exp:weblog:entries weblog="ideas_blog|personal_blog" category="22|24" limit="3"}
<div id="featured-content-left">
    <
h2>{title}</h2>
    <
p>{body}</p>
</
div>
{/exp:weblog:entries}

You can view at http://posner.bonfx.com, at the bottom of the page.

Profile
 
 
Posted: 02 July 2008 09:09 AM   [ Ignore ]   [ # 7 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23547
Joined  05-20-2002

Then sounds like all is well- and it’s better to go w/the documented parameter.  Like I say- I’m surprised EE did anything with it as category_id.

We good to close this one out, or you want to poke around a bit to be triple sure?

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 02 July 2008 09:20 AM   [ Ignore ]   [ # 8 ]  
Lab Assistant
RankRank
Total Posts:  128
Joined  03-24-2008

Nope, I’m good on this one! Thanks again! EE support is the bomb…

Profile
 
 
Posted: 02 July 2008 09:28 AM   [ Ignore ]   [ # 9 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23547
Joined  05-20-2002

Wheeee!  Closed.

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 65096 Total Logged-in Users: 52
Total Topics: 82246 Total Anonymous Users: 33
Total Replies: 442012 Total Guests: 271
Total Posts: 524258    
Members ( View Memberlist )