Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
How can I show a link's sort value?
I’m scratching my head on this one – is it possible to output a link’s sort value, please?
Last edited by gaekwad (Today 14:31:02)
Offline
Re: How can I show a link's sort value?
Not from the link tags, sadly. Not sure why we don’t have a <txp:link_info />
tag instead of all the useless specific ones, but this should be sidesteppable in 5.0.0 owing to content type retooling and CFs.
In the meantime (untested):
<txp:linklist>
<link::url />
...
<txp:php>
global $thislink;
echo $thislink['linksort'];
</txp:php>
</txp:linklist>
EDIT: for bonus marks you could set that PHP block up as a shortcode and call your Form linksort
. Then you can invoke it with <txp::linksort />
which is at least a bit more friendly – as long as you’re careful to only use it in a link context (otherwise it’ll error out unless you wrap some defensive code around it).
Last edited by Bloke (Today 15:15:22)
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: How can I show a link's sort value?
Unless you have etc_query
installed :-)
<etc::query globals="thislink" data="{?linksort}" />
Offline
Pages: 1