Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2015-04-05 06:03:14

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,120
Website Mastodon

Re: need help with Section/Article Navigation

GugUser wrote #274109:

Scheme of one version of my ways to do this:

<nav role="navigation">...

For the form “nav-sections” (¶ = replace with a not visible line break):

<li<txp:if_section name='<txp:section />'><txp:if_individual_article>><a class="active" href='/<txp:section />'><txp:section title="1" /></a><txp:else /> class="active"><txp:section title="1" /></txp:if_individual_article><txp:else />><a href='/<txp:section />'><txp:section title="1" /></a></txp:if_section></li>...

For the form “nav-sections-articlelist”:

<li<txp:if_section name='<txp:section />'> class="active"><txp:section title="1" />...

For the form “nav-articlelist”:

<li<txp:if_article_id id='<txp:article limit="1"><txp:article_id /></txp:article>'> class="active"><txp:title /><txp:else />><a href='<txp:permlink />'><txp:title /></a></txp:if_article_id></li>...

i decided to try this to automate my manual Navigation with a drop down list of categories for the Section Galleries. It does output al the sections but it doesn’t add the child sections to Galleries.

Are the forms types all Miscellaneous in your example or are some Article?


…. texted postive

Offline

Board footer

Powered by FluxBB