Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2008-10-16 10:50:37
- Distrahera
- Member
- Registered: 2008-09-20
- Posts: 30
Sub Sections
Hi!
I have a simple question I can’t seem to find the answer for in old posts..
My current txp site has breadcrumbs looking like this: home >> news
When Im at the news section and I see a list of all my news, that is what I see – great. But I want that trail to follow me up when I click an article like this: home >> news >> my newest article
Or like this: home >> users >> userName
I suppose I should declare sub-sections to make this happen or am I approaching this the wrong way? How is this usually done?
Many thanks!
Offline
Offline
#3 2008-10-16 11:24:33
- Distrahera
- Member
- Registered: 2008-09-20
- Posts: 30
Re: Sub Sections
Thanks it works great. The outcome is favorable but the behaviour is not quite what I was expecting since im using the breadcrumb tag.
I have had to wrap the breadcrumb in a p tag with a class giving it display:inline;
Then add the “if_individual_article” condition in another p tag with saame class. Showing the both paragraphs in line.. works ok.
I was expecting something like this though: <txp:breadcrumb wraptag=“p” deapth=“section, subSection, <if_individual_article>title</if_ind…></txp:breadcrumb>
(making sure the breadcrumb tag takes care of the entire breadcrumb)
But it works anyways, thanks alot!
Offline
#4 2008-10-16 12:07:26
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,308
Re: Sub Sections
Gocom wrote:
bc. home >> <txp:section /><txp:if_individual_article> >> <txp:title /></txp:if_individual_article>
and how to make them work as links?
like here
Offline
#5 2008-10-16 12:13:13
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: Sub Sections
Gallex wrote:
and how to make them work as links?
<txp:link_to_home>home</txp:link_to_home>>> <txp:section link="1"/><txp:if_individual_article> >> <txp:title /></txp:if_individual_article>
Offline
#6 2008-10-16 12:37:11
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,308
Re: Sub Sections
redbot wrote:
bc. <txp:link_to_home>home</txp:link_to_home>>> <txp:section link=“1”/><txp:if_individual_article> >> <txp:title /></txp:if_individual_article>
wow, great! and how to remove this “default” of home>>default if it’s in homepage (first page)? take a look
Offline
#7 2008-10-16 12:48:00
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: Sub Sections
Gallex wrote:
…and how to remove this “default” of home>>default if it’s in homepage (first page)? take a look
It can be done, but why do you want breadcrumb in your home?
IMHO you should wrap the breadcrumb code this way:
<txp:if_section name="default"><txp:else /><txp:link_to_home>home</txp:link_to_home>>> <txp:section link=“1”/><txp:if_individual_article> >> <txp:title /></txp:if_individual_article></txp:if_section>
or, if you really want it on the homepage try this:
<txp:link_to_home>home</txp:link_to_home><txp:if_section name="default"><txp:else />>> <txp:section link=“1”/><txp:if_individual_article> >> <txp:title /></txp:if_individual_article></txp:if_section>
Last edited by redbot (2008-10-16 12:48:45)
Offline
Re: Sub Sections
- Please, bookmark tag list
- Answer is if_section.
<txp:link_to_home>home</txp:link_to_home><txp:if_section name=""><txp:else />>> <txp:section link="1"/></txp:if_section><txp:if_individual_article> >> <txp:title /></txp:if_individual_article>
Edit. Redbot is faster.
Last edited by Gocom (2008-10-16 12:50:07)
Offline
#9 2008-10-16 13:18:57
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,308
Re: Sub Sections
redbot wrote:
It can be done, but why do you want breadcrumb in your home?
i don’t want to really :) ,but, maybe some day some client wants to…and then i have prepared for this
<txp:if_section name=“default”><txp:else /><txp:link_to_home>home</txp:link_to_home>>> <txp:section link=“1”/><txp:if_individual_article> >> <txp:title /></txp:if_individual_article></txp:if_section>
<txp:link_to_home>home</txp:link_to_home><txp:if_section name=“default”><txp:else />>> <txp:section link=“1”/><txp:if_individual_article> >> <txp:title /></txp:if_individual_article></txp:if_section>
first solution didn’t work, but second one did, thank’s
Offline
#10 2008-10-16 13:25:21
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: Sub Sections
Gallex wrote:
first solution didn’t work, but second one did, thank’s
The first solution is intended to show breadcrumb only if you are not in the homepage
Offline
#11 2008-10-16 13:35:32
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,308
Re: Sub Sections
redbot wrote:
The first solution is intended to show breadcrumb only if you are not in the homepage
aaa :)
but now i want (for learning purposes) images between links instead of >>
but this is not working:
<p><txp:link_to_home>home</txp:link_to_home><txp:if_section name="default"><txp:else /><txp:image id="9" /><txp:section link="1"/><txp:if_individual_article><txp:image id="9" /><txp:permlink><txp:title /></txp:permlink></txp:if_individual_article></txp:if_section></p>
Offline
#12 2008-10-16 14:42:26
- Distrahera
- Member
- Registered: 2008-09-20
- Posts: 30
Re: Sub Sections
Various ways to solve this – really useful.
So, have I understood this correctly if I am under the impression that a complete breadcrumb can not be created using the bredcrumb tag alone?
Offline