Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
[SOLVED] Creating a sectional navigation?
I’m trying to change from a section list that includes all sections (see list tag I’m using now below) to a tag that will show only the pages within a specific section (e.g.: “Services” section).
<txp:section_list default_title='<txp:text item="home" />' include_default="1" wraptag="ul" break="li">
<txp:if_section name='<txp:section />'>»</txp:if_section>
<txp:section link="1" title="1" />
<txp:if_section name='<txp:section />'>
<txp:article_custom section='<txp:section />' wraptag="ul" break="li">
<txp:if_article_id>›</txp:if_article_id>
<txp:permlink><txp:title /></txp:permlink>
</txp:article_custom>
</txp:if_section>
</txp:section_list>
Any help out there would be appreciated.
Living the Location-Independent Life: www.NuNomad.com
Offline
Re: [SOLVED] Creating a sectional navigation?
laptophobo wrote:
I’m trying to change from a section list that includes all sections (see list tag I’m using now below) to a tag that will show only the pages within a specific section (e.g.: “Services” section).
Sounds like a simple case of article_custom section="services"
.
Code is topiary
Offline
Re: [SOLVED] Creating a sectional navigation?
If I do the simple version, as you’ve illustrated correctly, I’d lose the formatting of the above script.
Living the Location-Independent Life: www.NuNomad.com
Offline
Re: [SOLVED] Creating a sectional navigation?
At this point I’d have to guess what you’re trying to achieve. Can you explain the problem in more detail?
Code is topiary
Offline
Re: [SOLVED] Creating a sectional navigation?
Hi Jeff,
If you go to http://www.hhcla.org/about/about-hhcla/ you’ll see within the right column navi tree the layout working as I want. (There’s not only the section, but the articles within that section.) However, if you go to http://www.hhcla.org/harm-reduction/harm-reduction/ you’ll see that I’ve applied the tag as you suggested. Notice how it does not display the articles? So, I’m just trying to match the later with the former.
Thanks much.
Living the Location-Independent Life: www.NuNomad.com
Offline
Re: [SOLVED] Creating a sectional navigation?
laptophobo wrote:
If you go to http://www.hhcla.org/about/about-hhcla/ you’ll see within the right column navi tree the layout working as I want. (There’s not only the section, but the articles within that section.) However, if you go to http://www.hhcla.org/harm-reduction/harm-reduction/ you’ll see that I’ve applied the tag as you suggested. Notice how it does not display the articles? So, I’m just trying to match the later with the former.
Perhaps I’m being dense, but I still don’t understand what you’re after. I can’t tell how you’ve applied that tag, or any tag, because the site is in Production mode (no tag trace), and the sidebar links are to a different domain, making it not at all obvious what output is from what tag. Your initial question is, to me, vague — are you saying you want to show the “Services” articles no matter what section you’re in, or that you want to trim the sidebar for each section to show only its articles, and none of the other section links?
Does it work to trim the code you posted originally so that it is just the article_custom
tag, hence:
<txp:article_custom section='<txp:section />' wraptag="ul" break="li">
<txp:if_article_id>›</txp:if_article_id>
<txp:permlink><txp:title /></txp:permlink>
</txp:article_custom>
Code is topiary
Offline
Re: [SOLVED] Creating a sectional navigation?
Yes, that worked! Thank you. I just needed to trim out some of the code.
Living the Location-Independent Life: www.NuNomad.com
Offline