Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2007-01-23 05:20:51
- WebKat
- Member
- Registered: 2007-01-16
- Posts: 301
Questions about menus, sections vs categories, and category_list
I will give a real example from my site:
I was frustrated with the supposedly related articles at the bottom (next/prev or newer/older) having nothing to do with the article they were appended to other than that they were posted sequentially, so I made a simplified version of my categories as sections.
I have a Category called “Fun”
There are six child categories under fun: Movie Reviews, TV, Music, Games, Humor, and Book Reviews.
I now also have a section called “Fun” because as noted, I was sick of a movie review having links at the bottom that went to recipes or political rants.
Well, now in the menu (wow_menu plugin) the things that have the same name for a category and a section link to index.php?s=Fun instead of index.php?c=Fun …which is bad for a number of reasons, not the least of which is because I can’t figure out how to get it to display properly when it’s a section (it obeys the “limit=1” thing that is the rule for if it’s not a category) …here is my article code on my primary page:
<txp:if_category> <txp:article form=“default” listform=“excerpt” limit=“5” pageby=“10” /> <txp:output_form form=“google468x60ad” /> <txp:article form=“default” listform=“excerpt” limit=“5” offset=“5” pageby=“10” /> <txp:else /> <txp:article form=“default” listform=“excerpt” limit=“1” /> </txp:if_category>
…but also because it won’t have the same contents (i.e. for “Fun” you get everything I’ve put into the Fun section, all in one big list, rather than separated out into games, movie reviews, etc).
I tried enclosing the above code into an if_section but then somehow everything was showing up twice on the page, and various other errors depending on how I mangled the code.
So how do I get the wow_menu to go back to linking to all categories instead of this weird “sometimes it links to sections” thing?
Next question:
I was wondering if category_list could do this…
When you go to, for example, the “Fun” category, there are some articles that I categorized just as Fun. Those I want to show up as a list. I would also like, however, for there to be links to the child categories. Not links to the articles IN the child categories, just something like “More articles: Games, Movie Reviews, (etc)” It seems like this should be possible… there is an attribute of “this_section” available, which is described as “Link to categories within the currently active section (overrides section). Available values: 1 (yes) or 0 (no). Default is 0 (no).” which sounds like pretty much exactly what I want, except for categories, not sections.
It won’t work as-is (as sections) because the structure isn’t exactly the same. For example, I have sections called “Food” and “Health”, but the category “Food” is a child of the category “Health”. I didn’t want people reading recipes in the “Food” category to have “related links” at the bottom to articles about constipation and so on, so I had to make “Food” its own section to assure that didn’t happen.
Anyway, anyone know a good way to do this?
(I hope that was at least somewhat understandable!)
Anyway, here is my test environment (which may or may not be displaying properly depending on when you look, since I am, after all, testing things.) http://test.opalcat.com/
—
WebKat
Offline
#2 2007-01-25 04:33:03
- WebKat
- Member
- Registered: 2007-01-16
- Posts: 301
Re: Questions about menus, sections vs categories, and category_list
sniffle
—
WebKat
Offline
#3 2007-01-25 17:45:12
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Questions about menus, sections vs categories, and category_list
I was frustrated with the supposedly related articles at the bottom (next/prev or newer/older) having nothing to do with the article they were appended to…
Have you tried a plugin like low_nav?
Offline
#4 2007-01-25 20:21:51
- WebKat
- Member
- Registered: 2007-01-16
- Posts: 301
Re: Questions about menus, sections vs categories, and category_list
No. Is there another one that does that? (That one has a dead link to a domain for sale, and the forum seems to imply that it didn’t work in later versions of Textpattern)
—
WebKat
Offline