Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Textile links to use site_url
Not something for Textpattern core I guess, but one thing that would be nice for local and staging would be links that use the site_url tag instead of whatever we enter into an article.
It gets confusing to use f.e: "Get in touch with us":http://domain.com/contact/
instead of "Get in touch with us":<txp:site_url />contact/
.
Simple change, but very worthwhile for local development.
Offline
Re: Textile links to use site_url
Doesn’t "Get in touch with us":/contact
work for both staging and live, and is shorter to type?
Maybe I’m missing something…
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Textile links to use site_url
Thanks, I was thinking about a method for absolute URL’s instead of relative. Hence the use of site_url
. Maybe I’m missing something ;)
Offline
Re: Textile links to use site_url
As for the request, unfortunately can not do. That’s not something we can implement. It could technically happen in PHP-Textile, in a way of it letting invalid HTML get through, but it needs to sanitize and encode input its given.
Your best option is either to regenerate the HTML markup from Textile (you can do it in deployment scripts or whatever you are using), or search and replace URL tokens in the database. You can also route your requests to the development server rather than the live one, which means you don’t have to change your site URL.
Offline
Re: Textile links to use site_url
Thanks Jukka and Stef – will stick with what we have then or change to relative URL’s. Appreciate the explanation.
Offline