Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2016-05-29 11:21:57
- raminrahimi
- Member
- From: India
- Registered: 2013-03-19
- Posts: 277
how to echo html tags in title
I’ve a title: (This is <br /> testing title
)
when i run <txp:title />
it will output to: This is <br />testing title
how i can run html tags as well, to output like this=>
This is
testing title
thank you
Last edited by raminrahimi (2016-05-29 11:23:01)
Offline
Re: how to echo html tags in title
raminrahimi wrote #299356:
I’ve a title: (
This is <br /> testing title
)…
Try something like <txp:custom_field name="Title" escape="" />
.
Each field in the write tab can be called through the custom field tag.
Offline
Re: how to echo html tags in title
What you can also do is insert a break-character such as |
or ###
into the title field and then use a replace plugin to replace that character, either with nothing when not needed, or with a <br>
or <wbr>
, e.g.
<txp:smd_wrap transform="replace|string|###|<br>"><txp:title /></txp:smd_wrap>
(Note: if you use a pipe (|
) in your title field, you need to change the param_delim
in smd_wrap).
TXP Builders – finely-crafted code, design and txp
Offline
#4 2016-05-31 09:15:50
- raminrahimi
- Member
- From: India
- Registered: 2013-03-19
- Posts: 277
Re: how to echo html tags in title
NicolasGraph wrote #299357:
Try something like
<txp:custom_field name="Title" escape="" />
.
Each field in the write tab can be called through the custom field tag.
Works perfect, thank you :-)
Offline
Pages: 1