Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
page_title
I know it has been answered a million times but I can not think of keywords to use in the forum.
Is there a way to omit the site name from the page title? ie. at the moment we get Site name: Page title. I would like to just get Page title
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: page_title
Not sure if this is what you want:
<txp:title /> | <txp:site_name /> // individual article
<txp:section title="1" /> | <txp:site_name /> // section page
IOW, build it manually ?
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: page_title
Thanks! I’ll give it a try…
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: page_title
Hi Philippe,
Following your suggestion I have the code below which works just fine. The site is using only using sections.
<txp:if_section name='<txp:section />'>
<h1><txp:section title="1" /></h1>
<txp:else />
<h1><txp:title /></h1>
</txp:if_section>
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: page_title
phiw13 wrote #307304:
IOW, build it manually ?
Yes, that would be my suggestion too. Better control over the output.
Offline
Re: page_title
colak wrote #307308:
Hi Philippe,
Following your suggestion I have the code below which works just fine. The site is using only using sections.
<txp:if_section name='<txp:section />'>...
Yiannis,
I’m confused. In your OP, you talk about the <txp:page_title />
tag – which is intended to generate the <title />
tag (in the <head />
docs. But your code snippet shows you want to use it in the <body />
… For the latter the most logical tags are the ones I mentioned. My suggestion was for an alternative to populate the <title />
, for which <txp:page_title />
is a bit limited (if memory serves there have been some discussions about making that tag more flexible, but I can’t immediately find it).
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: page_title
Apologies for not be so clear. Basically I was looking for a way to omit the site name from the site’s <body>
. The code above does not work for the home page but the code below does in all the situations I am dealing with.
<txp:if_section name="">
<h1><txp:site_name /></h1>
<txp:else />
<txp:if_section name='<txp:section />'>
<h1><txp:section title="1" /></h1>
<txp:else />
<h1><txp:title /></h1>
</txp:if_section>
</txp:if_section>
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Pages: 1