Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#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