Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2012-04-19 22:55:22
- brunodario
- Member
- From: Belo Horizonte, Brasil
- Registered: 2007-09-19
- Posts: 75
Remove last slash from <txp:permlink/>
I’m trying to retrieve the number of facebook comments an article has and found out that the code
code
<fb:comments-count href=<txp:permlink/>/></fb:comments-count>
doesn’t work because of the last “/” slash added to the URI (it works without the slash… go figure).
I was wondering if there’s a way to remove that last slash? How can i get the permlink in php, maybe grabbing it and doing some regex
code
$permlink = preg_replace(‘{/$}’, ‘’, $site);
Thx in advance.
Last edited by brunodario (2012-04-19 22:55:43)
Offline
#2 2012-04-19 23:07:32
- brunodario
- Member
- From: Belo Horizonte, Brasil
- Registered: 2007-09-19
- Posts: 75
Re: Remove last slash from <txp:permlink/>
Shame on me, figured it out. Sorry for the bad post, i’ve being searching for a lot but as usual right after i’ve posted i “got the light”
Offline
#3 2012-04-20 11:19:33
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Remove last slash from <txp:permlink/>
brunodario wrote:
as usual right after i’ve posted i “got the light”
That’s why posting here helps :) Don’t worry, you’re not alone ;)
Offline