Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-02-28 01:01:03

MaLer
New Member
From: Praha
Registered: 2004-04-15
Posts: 8
Website

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

#2 2008-02-28 01:20:43

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: unwanted wrap around <txp:body /> tag - in some cases.

its because of textile.

Offline

#3 2008-02-28 01:22:34

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

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

#4 2008-02-28 01:33:49

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: unwanted wrap around <txp:body /> tag - in some cases.

You’re using <txp:body/> for a URI? Use a custom field instead!

Offline

#5 2008-02-28 11:14:23

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

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

Board footer

Powered by FluxBB