Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
How to get a trailing slash in URI's?
I am attempting to get my site URI’s as such: example.com/section/article/
but am having a bit of trouble finding out how to get the trailing slash.
I understand it can be done with .htaccess
, which I’ve done (and it’s redirecting beautifully), but I don’t know how to get Textpattern to write the canonical URI’s this way?
\\//_ Live long and prosper.
Offline
Offline
Re: How to get a trailing slash in URI's?
Thank you, Gocom. I’ve been told such (articles are not directories), but I’m trying to maintain a link syntax from a former CMS.
\\//_ Live long and prosper.
Offline
Re: How to get a trailing slash in URI's?
Gocom wrote:
Remember that articles are not directories. Anyways:
bc. <txp:permlink />/
Just add appending slash.
I may not have understood correctly. I do this?
<txp:permlink>/<txp:title /></txp:permlink>
That outputs the same link, with the title having a slash in front of it.
/Example
\\//_ Live long and prosper.
Offline
Re: How to get a trailing slash in URI's?
But I think something like would work (not tested)
<a href="<txp:permlink />/"><txp:title /></a>
Offline
Re: How to get a trailing slash in URI's?
jonlandrum wrote:
I may not have understood correctly. I do this?
<txp:permlink />
is both, a single tag and a container. When used as a single tag, it outputs just the URL.
- See permlink
- And bookmark Tag Reference
Offline
Re: How to get a trailing slash in URI's?
Gocom wrote:
<txp:permlink />
is both, a single tag and a container. When used as a single tag, it outputs just the URL.
- See permlink
- And bookmark Tag Reference
Oh, I didn’t know that.
tye wrote:
But I think something like would work (not tested)
<a href=”<txp:permlink />/”><txp:title /></a>
I’ll go test that right away. Thanks tye, and thanks again Gocom.
Last edited by jonlandrum (2009-12-12 02:08:28)
\\//_ Live long and prosper.
Offline
Re: How to get a trailing slash in URI's?
Works exactly as advertised, thank you both once again.
\\//_ Live long and prosper.
Offline
Re: How to get a trailing slash in URI's?
Found a better solution (doesn’t require changing tags for every form, and works with plugin-generated content such as site maps): gbp_permanent_links
\\//_ Live long and prosper.
Offline
Pages: 1