Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
[textile] Textile chewing up textpattern tags
I’m running into an issue today and I though always worked, including textpattern tags in an article parsed with textile.
for example trying to wrap a image tag with a link.
"<txp:image id='1'>":/goes/somewhere
Spits out
<p><a href="/goes/somewhere" style="text-align:left;">txp:image id=‘1’></a></p>
"<txp:image id="1">":/goes/somewhere
spits out
<p>“<txp:image id="1">“:/goes/somewhere</p>
Not exactly sure why the a is getting a alignment style when I didn’t set one, unless it’s picking up on the “<” from the <txp:image id='1'>
Is there a way to prevent textpattern tags from being encoded like this? I have used combinations of textile link and textpattern image tags before I though and it’s worked. Maybe a setting deep down in TXP?
Offline
Re: [textile] Textile chewing up textpattern tags
ecklesroad wrote:
Not exactly sure why the a is getting a alignment style when I didn’t set one, unless it’s picking up on the “<” from the
<txp:image id='1'>
Textile treats any modification glyphs as literal modification glyphs no matter what the context is. It doesn’t really care what one gives it, where it be HTML or propriety templating language. If you start inline element’s content with opening HTML tag (or any other chevron language), the tag’s bracket will be picked up as an alignment option.
If you do want to use HTML or any other tag language, like Textpattern’s server-side templating language inside an inline element, start the content with a space, or some other white-space character. This makes sure the bracket is not considered as an alignment option.
For example, the following:
" <txp:image id='1' />":/goes/somewhere
Genetates:
<p><a href="/goes/somewhere"><txp:image id='1' /></a></p>
Offline
Re: [textile] Textile chewing up textpattern tags
Ok that make sense and I can replicate it on this side. How about something like this:
" <txp:image id='1'>":/<txp:section />/somewhere
Generates
<p>“ <txp:image id='1'>“:/<txp:section />/somewhere</p>
Maybe i’m just pushing my luck here….
Offline
#4 2013-01-05 00:56:56
- GugUser
- Member
- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,473
Re: [textile] Textile chewing up textpattern tags
"!/images/1.jpg!":/goes/somewhere
or with a white space at the beginning if you don’t need the paragraph "!/images/1.jpg!":/goes/somewhere
.
Last edited by GugUser (2013-01-05 00:59:40)
Offline