Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
article in a certain section not present when link selected
Please forgive me if this issue has been addressed elsewhere, and maybe point me to the link? I searched and searched, but maybe my search strings were bad ones because I couldn’t get results which pertained to my problem. Or maybe I did, but the explanations were so over my head I couldn’t see that!
I am using rc1 with messy urls. I have a section called ‘recipe’ I built with this tutorial. Within that section I have categories of recipes. Now, I understand that categories span sections as a function of the software? For example,
< txp:popup type=“c” label=“Browse Categories” wraptag=“p” / >
(without those spaces, of course) generates a popup menu of ALL the categories, no matter what. It isn’t possible to assign particular categories to particular sections. I can live with that, I guess, but the real problem is that clicking on any category that contains articles under the recipe section doesn’t bring up any articles. It is as if those articles do not exist. What gives? I assume it has something to do with the fact that the articles are in a section which isn’t the default, but that’s about it.Also, while I am here: I assume that I could hard-code a menu which would display the sections and their subsequent categories, since I want some categories to show up under some sections but not others? (Of course I would have to get the links functioning properly first). Or can this be accomplished with plugins? If so, has anyone done it and succeeded? The possible neccessity of plugins ( I have two installed and working satisfactorily already) is one of the reasons I am staying with rc1 for now…
Thank you all for your time.
Offline
#2 2005-06-10 02:02:12
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: article in a certain section not present when link selected
Category lists made from the url (?c=catname) use the default page. If you happen to not being using <txp:article /> anywhere on it, then they wouldn’t show up. Put something like this in your front page:
<code>
<txp:if_category>
<txp:article />
</txp:if_category>
</code>
Then you just need to customize the appearance.
Regarding only certain categories on a section, that really depends on how you want it to appear – are you wanting them all mixed in (but only certain ones) or separated?
Offline
Re: article in a certain section not present when link selected
Hi Mary,
My default page contains this line:
<code><txp:article limit=“5” /></code>
Using this:
<code><txp:if_category>
<txp:article limit=“5” />
</txp:if_category></code>
made all of the articles disappear! Or rather, none of them show up at all, whether a category is selected or you are at the main page! Did I misunderstand? Or was there another step somewhere that I missed?
Also, I guess there is no way to get it to use a different page depending on the section?
As per the certain categories, how do you mean “mixed in, or separated”? What I want to display would be something like this:
SectionA
*CategoryA1
*CategoryA2
*CategoryA3
SectionB
*CategoryB1
*CategoryB2
*CategoryB3
Where none of the categories for SectionA appear in SectionB and vice versa. If for some reason an article was associated with 2 categories at once, I would like it to appear when you click on either of the categories it is associated with.
Thanks again!!!! You have already helped me start to understand this better!
Offline
#4 2005-06-10 03:47:41
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: article in a certain section not present when link selected
I had meant adding that to your page, not replacing anything. If that line was already there, that shouldn’t have been the problem. Its probably due to your section(s) being set to “not display on front page”.
And you wanted this as a list on one page? or a page per section?
Offline
Re: article in a certain section not present when link selected
One page per section … I could just put the list on all of my pages, right? (I have 4 total, as of now, including the archive page.)
Offline
#6 2005-06-10 15:00:49
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: article in a certain section not present when link selected
Well, one approach I can think of would be:
<h2>CategoryA1</h2>
<txp:article_custom section="SectionA" category="CategoryA1" />
<h2>CategoryA2</h2>
<txp:article_custom section="SectionA" category="CategoryA2" />
<h2>CategoryA3</h2>
<txp:article_custom section="SectionA" category="CategoryA3" />
Only article custom allows to pick categorys, but, it is not section-sensitive, so we also have to tell it what section to grab from.
Offline
Re: article in a certain section not present when link selected
midnightferret: did you get along with this, or did you gave it up? Im also after the solution with posting in a certain catogery, and section – wanting it to appear there. Same problem here – eigther all articles appear on the first page (choosing the sections to be shown there). Or they do not appear at all in the category-roll. Only if I enter the section-link.
all we need is some creactivism
Offline