Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2008-10-22 05:24:30
- dreamer
- Member
- Registered: 2007-06-08
- Posts: 242
How to get subpages for a section to appear in sidebar.
I want the subpages of each section to appear in the sidebar but for some reason, i can’t get the code right.
For example, on an individual page like this, the subpages will appear. But on the landing page of that section like here , the subpages won’t appear on the sidebar.
What is wrong with my code?
This is how the page template looks like;
<div id="sidebar">
<txp:if_individual_article>
<txp:if_article_section name="home">
<h2 class="subpage"><txp:section title="1" /></h2>
<ul id="subpage">
<txp:article_custom section="home" form="subpagelist" sort="Title asc" />
</ul>
</txp:if_article_section>
<txp:if_article_section name="community">
<h2 class="subpage"><txp:section title="1" /></h2>
<ul id="subpage">
<txp:article_custom section="community" form="subpagelist" sort="Title asc" />
</ul>
</txp:if_article_section>
</txp:if_individual_article>
This is how the form for the subpagelist looks like;
<li><a href="<txp:permlink />"><txp:title /></a></li>
Last edited by dreamer (2008-10-22 05:32:09)
Offline
#2 2008-10-22 05:43:09
- dreamer
- Member
- Registered: 2007-06-08
- Posts: 242
Re: How to get subpages for a section to appear in sidebar.
funny how as soon as i post this, then the solution comes to me even though i’ve been staring at the screen for hours.
basically, I was using the wrong if tag. Instead of using if_article_section tag, I should use if_section tag and omit the <txp:if_individual_article></txp:if_individual_article> container tag as well.
duh.
Offline