Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
breadcrumb navi
I ask in the german forum, but it was hardly reactions …
My code – my Baustein:
<p class="breadcrumb">
<txp:if_section name="default">
</txp:if_section>
<txp:if_section name="depression, katzen">
<txp:if_section name="katzen">
<txp:if_individual_article>
<txp:else />
<h4>Unsere 4 Katzen</h4>
<p><strong>Venus</strong> (Hauskatze), geboren 11/2002<br />
<strong>Odin</strong> (Hauskater), geboren 09/2005 <br />
<strong>Luna</strong> (Norwegische Waldkatze, Mutter von Adonis), 06/2005<br />
<strong>Adonis</strong> (Norwegischer Waldkatzer), 03/2007
</p></txp:if_individual_article>
<txp:if_individual_article> <txp:section name="katzen" title="1" link="1" /> » <txp:if_individual_article><title /></txp:if_individual_article></txp:if_individual_article>
</txp:if_section>
<txp:if_section name="depression">
<txp:if_individual_article> <txp:section name="depression" title="1" link="1" /> » <txp:if_individual_article><title /></txp:if_individual_article></txp:if_individual_article>
</txp:if_section>
<txp:else />
<txp:link_to_home>Blog:</txp:link_to_home> <txp:if_individual_article> <txp:title /></txp:if_individual_article>
</txp:if_section>
</p>
The output of my code, see the breadcrumb navi on top of the site on single site
Section DEPRESSION,
this is the output of the breadcrumb navi:
Depression: but no article title
Section KATZEN
this is the output of the breadcrumb navi – single site
Katzen: no article title!?
The breadrumb navi on a single site should look like:
Katzen: Adonis
or on section Depression: (Link single site: http://psychomuell.de/depression/1704/gestresst-gereizt-oder-aggressiv)
Depression – Gestresst=Gereizt? Oder Aggressiv?
Last edited by SuMu (2010-05-13 15:32:48)
Offline
Re: breadcrumb navi
Short answer: <title />
should be <txp:title />
.
Offline
Re: breadcrumb navi
Large answer: the code look a bit like a mess, I would suggest you to rewrite it.
A good start would be to separate the breadcrumb code by section, similarly as what you did, but writing it simpler.
Also, you are nesting h4
and p
inside p.breadcrumb
. That’s invalid code. The quick fix would be changing <p class="breadcrumb">
to <div class="breadcrumb">
.
<div class="breadcrumb">
<txp:if_section name="default">
</txp:if_section>
<txp:if_section name="katzen">
<txp:if_article_list>
<h4>Unsere 4 Katzen</h4>
<p><strong>Venus</strong> (Hauskatze), geboren 11/2002<br />
<strong>Odin</strong> (Hauskater), geboren 09/2005 <br />
<strong>Luna</strong> (Norwegische Waldkatze, Mutter von Adonis), 06/2005<br />
<strong>Adonis</strong> (Norwegischer Waldkatzer), 03/2007
</p>
</txp:if_article_list>
<txp:if_individual_article>
<txp:section name="katzen" title="1" link="1" /> » <txp:title />
</txp:if_individual_article>
</txp:if_section>
<txp:if_section name="depression">
<txp:if_individual_article>
<txp:section name="depression" title="1" link="1" /> » <txp:title />
</txp:if_individual_article>
</txp:if_section>
<txp:if_section name="katzen,depression">
<txp:else />
<txp:link_to_home>Blog:</txp:link_to_home> <txp:if_individual_article> <txp:title /></txp:if_individual_article>
</txp:if_section>
</div>
This is still a bit dirty, but I think is shorter and easier to read and follow, and should do exactly the same.
Offline
Re: breadcrumb navi
Great, thank you so much, Maniqui :-)
you could see the link Blog, on top of the default section.is it possible for each section?
on section depression, the hyperlinked section depression? on top of the page?
Last edited by SuMu (2010-05-13 15:22:41)
Offline
Pages: 1