Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
­ in title of article
Hi, I just posted an article with a rather long title with very long words in German. In order to have a smooth recent-articles-list, I used the ­ tag between the words. This works really fine, but in txp_page_title ­ translates into a – which is always displayed. Do you know a work around?
Offline
Re: ­ in title of article
Did you try using &173;
instead?
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: ­ in title of article
When entering &173; the hyphen is always displayed :(
Offline
#4 2009-07-17 09:07:24
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: ­ in title of article
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: ­ in title of article
txp:page_title />
isn’t the culprit. Look in page source and you’ll see the ­
entity is still there. It’s a browser issue. Interesting article about soft hyphens here, which I won’t pretend to have fully read, but it’s clear that browser handling of ­
is not entirely reliable.
Code is topiary
Offline
Re: ­ in title of article
If you want a workaround, replace <txp:page_title />
with this:
<txp:php>echo str_replace(array('­','­','­'),'',page_title(array()));</txp:php>
To set page_title
’s separator
attribute, use this version:
<txp:php>echo str_replace(array('­','­','­'),'',page_title(array('separator'=>': ')));</txp:php>
changing the value as desired (here it’s a colon followed by a space, which is the default value).
Or you could easily make a little plugin out of this.
Last edited by jsoo (2009-07-17 10:45:19)
Code is topiary
Offline
Re: ­ in title of article
Thank you very much for your help. The workaround just works great. Probably the escaping of html in page_title would be a nice feature for the coming textpattern version :)
Offline
Pages: 1