Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
(Another) <title> problem
My front page <title> is empty. Can anybody tell me what might cause this? Here’s the code I’m using:
<title>
<txp:if_individual_article>
<txp:title /> - <txp:site_name />
<txp:else />
<txp:if_section>
<txp:if_section name="">
<txp:site_name />
<txp:else />
<txp:section title="1" /> - <txp:site_name />
</txp:if_section>
</txp:if_section>
</txp:if_individual_article>
</title>
Last edited by maruchan (2010-10-04 19:13:00)
Offline
Re: (Another) <title> problem
Because of the additional attributeless <txp:if_section>
statement. Remove it, it does nothing, really; w/o name
attribute if_section tag won’t return anything.
Therefor we get:
<title>
<txp:if_individual_article>
<txp:title /> - <txp:site_name />
<txp:else />
<txp:if_section name="">
<txp:site_name />
<txp:else />
<txp:section title="1" /> - <txp:site_name />
</txp:if_section>
</txp:if_individual_article>
</title>
Last edited by Gocom (2010-10-04 20:27:49)
Offline
Re: (Another) <title> problem
Ah! Thanks, that seems to have worked.
Offline
Re: (Another) <title> problem
w/o name attribute if_section tag won’t return anything.
Gocom, correct me if wrong, but w/o name attribute, if_section
will test if current context is a section. As per maruchan’s post, it seems that home page (aka “default” section) isn’t considered a section.
Offline
Re: (Another) <title> problem
maniqui wrote:
Gocom, correct me if wrong, but w/o name attribute,
if_section
will test if current context is a section. As per maruchan’s post, it seems that home page (aka “default” section) isn’t considered a section.
Kinda. Practically it returns true for everything else than section equals default. Section is set everywhere else if not specifically overdefined by a plugin etc.
I’ve sometimes wondered by $s
is always set and why you can change the page template articles use by simply adding ?s
to the URL.
Last edited by Gocom (2010-10-04 20:53:21)
Offline
Pages: 1