Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2009-08-22 15:11:04
- nmm124
- New Member
- Registered: 2009-08-22
- Posts: 2
using site_url in links
I’m having trouble with txp:site_url in links. TextPattern somehow gets confused and escapes the end “> characters of the anchor, which destroys the link and all content thereafter.
It doesn’t happen all the time but I’m having trouble narrowing it down. When I copy a link from my footer form (where it works fine) into the content area of an article, for example, it comes out mangled.
For example:
<a href="<txp:site_url/>donate">Make a donation</a>
is rendered
<p><a href="http://globalpeopleproject.net/txptest/donate”>Make a donation</a></p>
and subsequently destroys the entire page.
I’ve also tried:
"Make a donation":<txp:site_url />donate
but that just write the line out as normal text.
What should I do to use site_url in an article?
Thanks in advance!
Offline
#2 2009-08-22 15:42:57
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: using site_url in links
Try ==<a href="<txp:site_url/>donate">Make a donation</a>==
Surrounding items with double equal signs disables textile for that item.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#3 2009-08-22 16:01:33
- nmm124
- New Member
- Registered: 2009-08-22
- Posts: 2
Re: using site_url in links
Danke Uli!
It works a treat. A little counter-intuitive but I guess the various opening and closing brackets were confusing the Textile engine.
Thanks for the super-fast response.
Offline
Pages: 1