Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#13 2009-02-05 01:15:21
- jammer
- Member
- Registered: 2009-01-13
- Posts: 36
Re: Category Links
Ahhhh!!!! Those are the exact ones. OK. Thanks again. My brain’s fried up from all the cold weather….;)
You’re a genius.
Thanks. I’ll let you know the results when I test it later…
MJ
Offline
#14 2009-02-06 01:04:19
- jammer
- Member
- Registered: 2009-01-13
- Posts: 36
Re: Category Links
The examples work just fine, except what keeps happening is, all the “Categories” and the articles appear on the same page.
What I’m trying to achieve is…..when I click on a “Section’, the “Category” list is displayed. Then when I clickon a “Category”, ONLY the specific “Category” name selected and the articles for that specific “Category” gets listed.
I know it’s possible, but I’m totally new to Textpattern so I know I’m doing something wrong but I can’t figure it out…
Thanks
mj
Offline
#15 2009-02-06 01:20:39
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Category Links
I can’t help you if I don’t know what code you have on your page…
Offline
#16 2009-02-06 02:10:00
- jammer
- Member
- Registered: 2009-01-13
- Posts: 36
Re: Category Links
This is the code in the FORM.
bc: <txp:if_section>
<txp:if_category>
<txp:article listform=“article_listing” />
<txp:else />
<txp:category_list parent=’<txp:section />’ exclude=’<txp:section />’
this_section=“1”
label=“Categories”
type=“article”
break=“li”
wraptag=“ul”
/>
</txp:if_category>
</txp:if_section>
<txp:article listform=“article_listing” limit=“5” />
bc:
This is the code in the PAGE template
bc: <txp:output_form form=“meta_nav” />
<txp:output_form form=“header_nav” />
<body>
<div id=“center” /> <div id=“content”>
<txp:article form=“default_nav” />
<!— right —> </div> <!— ends #content —> <div id=“sidebar-1”> </div></div> <!— ends #center —>
<txp:output_form form=“footer_nav” />
bc:
There are errors there somewhere. Just can’t figure it out yest…
Thanks
mj
Offline
#17 2009-02-06 16:41:35
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Category Links
Ah I see, you shouldn’t have that code in a form, but on the page. Does this do what you want?
<txp:output_form form="meta_nav" />
<txp:output_form form="header_nav" />
<body>
<div id="center" />
<div id="content">
<txp:if_section>
<txp:if_category>
<txp:article listform="article_listing" />
<txp:else />
<txp:category_list parent='<txp:section />' exclude='<txp:section />'
this_section="1"
label="Categories"
type="article"
break="li"
wraptag="ul"
/>
</txp:if_category>
<txp:else />
<txp:article listform="article_listing" limit="5" />
</txp:if_section>
</div> <!-- ends #content -->
<!-- right -->
<div id="sidebar-1">
</div>
</div> <!-- ends #center -->
<txp:output_form form="footer_nav" />
Offline
#18 2009-02-06 16:53:20
- jammer
- Member
- Registered: 2009-01-13
- Posts: 36
Re: Category Links
I did try something similar before and now I’ve placed your code in a page and I get the same result…a blank page.
When I call it up in a form the way I sent it to you previously, I get the desired results (with a few quirks) BUT everything is duplicated. even the syntax errors(strange huh!!!).
I will play around with the latest code you sent and I’ll let you know later the results.
Thanks as usual…
mj
Offline
#19 2009-02-06 16:58:43
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Category Links
Have a look at this FAQ and if you can’t find it, post the tag trace here.
Offline