Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Title
Hi, my current code for title on my site is:
<title><txp:if_section name="default"><txp:site_name /> - Introduce a Little Anarchy<txp:else /><txp:page_title separator=" - " /></txp:if_section></title>
What I want it to do is make it so that it will show the section title when viewing an article or category, so at the moment if i went to, domain.com/blog/1/welcome
it would just show “domain.com – welcome” in the title, what i want is it to say, “domain.com – Blog – Welcome”
Thanks. x
Last edited by driz (2008-08-22 11:43:12)
~ Cameron
Offline
Re: Title
You can always use Textpattern tags, including section, title, category, if_category, if_section.
In example:
<title>
<txp:site_name />
<txp:if_section name="">
- Introduce a Little Anarchy
<txp:else />
- <txp:section title="1" />
</txp:if_section>
<txp:if_category>
- <txp:category title="1" />
</txp:if_category>
<txp:if_individual_article>
- <txp:title />
</txp:if_individual_article>
</title>
Last edited by Gocom (2008-08-22 12:41:17)
Offline
Re: Title
That works quite nice, another little issue I’m having is that, my blog categories are linked to the root, so if i was on my blog and choose a cat, it would jump to domain.com/category/mycat
where as i want it to be relative to my domain.com/blog/category/mycat
~ Cameron
Offline
Re: Title
See attributes this_section
and section
for:
Yep, you can link to sections. Also you can build the links manually. The link structure would be this kind: domain.com/blog/?c=mycat
. There is multiple ways to build that kind of links, only the sky is the limit.
Offline
Pages: 1