categories not showing
Posted: 16 August 2006 09:46 AM   [ Ignore ]  
Research Assistant
RankRankRank
Total Posts:  761
Joined  06-01-2004

I tried to use the following code:

{exp:weblog:categories weblog="wl" show="117"} <a href="{path=group/template}">{category_name}</a> {/exp:weblog:categories}

But category 117 is not showing.

I verified that it’s a category from the category group associated with the weblog.

Please help.

Thanks

 Signature 

mode.com | schmuck.com | mode.ch | shop.ch

Profile
 
 
Posted: 16 August 2006 09:53 AM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23522
Joined  05-20-2002

It should work.  Try dropping the show parameter- do all the cats show then- including 117?

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 16 August 2006 09:55 AM   [ Ignore ]   [ # 2 ]  
Research Assistant
RankRankRank
Total Posts:  761
Joined  06-01-2004

{exp:weblog:categories weblog="wl"} <a href="{path=group/template}">{category_name}</a> {/exp:weblog:categories}

This works like a charm, all categories are shown.

 Signature 

mode.com | schmuck.com | mode.ch | shop.ch

Profile
 
 
Posted: 16 August 2006 09:56 AM   [ Ignore ]   [ # 3 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23522
Joined  05-20-2002

Hm- well, I’ll go test it and see if I can replicate.  Are you on the latest build/version?

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 16 August 2006 09:57 AM   [ Ignore ]   [ # 4 ]  
Research Assistant
RankRankRank
Total Posts:  761
Joined  06-01-2004

EE 1.4.2 Build 20060620

 Signature 

mode.com | schmuck.com | mode.ch | shop.ch

Profile
 
 
Posted: 16 August 2006 10:01 AM   [ Ignore ]   [ # 5 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23522
Joined  05-20-2002

Hm- it’s working dead ok on mine:

{exp:weblog:categories weblog="fall" show="9"}
<a href="{path=group/template}">{category_name}</a><br>
{/exp:weblog:categories}


Test page.  Um….  Crud.  I’m rather out of ideas- pretty sure there is no check on whether there are entries or not.  By default, it shouldn’t check, though you could add show_empty=“yes” just to double check.  But you really shouldn’t have to.

You’re absolutely sure the cat id is correct?  It’s what you see when you hover over the link in the Cx?

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 16 August 2006 10:09 AM   [ Ignore ]   [ # 6 ]  
Research Assistant
RankRankRank
Total Posts:  761
Joined  06-01-2004

I tried other categories and was now able to show root level categories only, but I want to be able to show child categories too:

-A   [C1]
—-a1 [C2]
—-a2 [C3]
-B   [C4]
—-b1 [C5]
—-b2 [C6]

{exp:weblog:categories weblog="wl" show="C1"} <a href="{path=group/template}">{category_name}</a> {/exp:weblog:categories}

OR

{exp:weblog:categories weblog="wl" show="C2"} <a href="{path=group/template}">{category_name}</a> {/exp:weblog:categories}

 Signature 

mode.com | schmuck.com | mode.ch | shop.ch

Profile
 
 
Posted: 16 August 2006 10:13 AM   [ Ignore ]   [ # 7 ]  
Research Assistant
RankRankRank
Total Posts:  761
Joined  06-01-2004

I found this in the manual now:

Note: If you specify that a parent category is not shown, then any children of that parent category are then unable to be shown by the tag. The parent category is required for any and all children categories.

So this is the reason for this.
Hm maybe it could be accomplished with the query module and a custom query?

 Signature 

mode.com | schmuck.com | mode.ch | shop.ch

Profile
 
 
Posted: 16 August 2006 10:19 AM   [ Ignore ]   [ # 8 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23522
Joined  05-20-2002

Hm- edited- not buggy

Blarg- anyway, point is, it looks like in order to show id 2 in the above example, you also need to include its parent.  So- try it with show=“1|2” and it should work to show both.  But if you don’t include the parent in there, the child doesn’t show either.  Also- ditch the C’s in the parameter.

There is some logic in requiring that the parent be shown- particularly with style nested- which is the default.  It’s the same reason that when you use show empty- it will show empty parents, as long as they are parents of a subcat either entries.  If it doesn’t work like that, the whole nesting bit gets completely buggered.

ETA- checked the docs, it does say:

Note: If you specify that a parent category is not shown, then any children of that parent category are then unable to be shown by the tag. The parent category is required for any and all children categories.

So basically, not specifying the parent in the show is pretty much the equivalently of saying ‘NOT’ the parent- hence the results you see.

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 16 August 2006 11:21 AM   [ Ignore ]   [ # 9 ]  
Research Assistant
RankRankRank
Total Posts:  761
Joined  06-01-2004

Thanks.

 Signature 

mode.com | schmuck.com | mode.ch | shop.ch

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: 64904 Total Logged-in Users: 51
Total Topics: 81848 Total Anonymous Users: 28
Total Replies: 440045 Total Guests: 235
Total Posts: 521893    
Members ( View Memberlist )