Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 Today 09:58:05

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,363
Website GitHub Mastodon Twitter

permlinks

I’m yet to update to the latest release but I get an error when using <txp:permlink id="2147"><txp:permlink /></txp:permlink> in an article.

The html parsed is <a rel="bookmark" href="https://www.site.tld/correct-url">https://www.site.tld/current-article-url</a>


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#2 Today 10:52:27

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,402
Website GitHub

Re: permlinks

You don’t tend to use permlink tags like that. Either:

  1. Wrap the content you want to display in a <txp:permlink>... </txp:permlink> container; OR
  2. Use it as a single tag to ouput the URL to the (current or nominated) article.

What your example is saying:

  • Grab the permlink to article ID 2147. Start making an anchor that points to it.
  • Get the current URL permlink and use it as content for the anchor.

It doesn’t ‘set context’ inside the container for you, so you’ll need:

<txp:permlink id="2147"><txp:permlink id="2147" /></txp:permlink>

OR:

<a href="<txp:permlink id="2147" />"><txp:permlink id="2147" /></a>

The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB