Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
unwanted wrap around <txp:body /> tag - in some cases.
I’ve found funny problem. i use <txp:body /> tag for linking to other sitest (article with excerpt, body is link, i can construct in this way articles with link easily – you can see on http://maler.cz in center part, articles with “iphonemania.cz” tag).
I use this quite stupid construction in form:
<a href=”<txp:body />”><txp:title /></a>
What i’ve found is, that if in body is JUST some URL, i’ll get this in code
<a href=” <p>http://iphonemania.mobilmania.cz/?q=node/97</p>”>iPhone event 6. března: SDK a nové vlastnosti pro firmy</a>
when i’ll put ONE space in front of URL, i’ll get this:
<a href=” http://iphonemania.mobilmania.cz/?q=node/97”>iPhone event 6. března: SDK a nové vlastnosti pro firmy</a>
Any idea WHY? and any idea why there is allways space in front of URL in final HTML?
Last edited by MaLer (2008-02-28 01:01:34)
Offline
Re: unwanted wrap around <txp:body /> tag - in some cases.
its because of textile.
Offline
Re: unwanted wrap around <txp:body /> tag - in some cases.
Are you sure there is no space (or return) between <a href="
and <txp:body
in your form?
Ha, iblastoff’s correct. If the space is a problem, turn off Textile for those articles.
Last edited by jsoo (2008-02-28 01:29:19)
Code is topiary
Offline
Re: unwanted wrap around <txp:body /> tag - in some cases.
You’re using <txp:body/>
for a URI? Use a custom field instead!
Offline
Re: unwanted wrap around <txp:body /> tag - in some cases.
There are 2 problems with this. One is the action of textile and the other is the use of a form. I also think that the resulting link should be wrapped in a “p” tag so why not just ditch the form you have and the space at the start of the line and use something like <a href="http://iphonemania.mobilmania.cz/?q=node/97"><txp:title /></a>
in your article? I think this should give you the link you are after and it will get textiled so will have the appropriate “p” tag wrapper. Of course you would still need a form to call it but it would just contain the <txp:body />
tag without all the cruft.
Last edited by thebombsite (2008-02-28 11:33:48)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline