Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 Yesterday 20:47:25

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,756
GitHub

Extract the linksort value from a link

Is there a tag + attribute to extract the link sort value from a link? I can get the link name, ID, URL, description, category and author…I just haven’t found the secret sauce for the sort value.

Use case: I have a lowercase version of the title for sorting, and I’m trying to best use the available fields so output_form can grab form contents from an associated (i.e. link sort value) form.

Thank you.

Last edited by gaekwad (Yesterday 20:47:44)

Offline

#2 Yesterday 21:59:20

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,214
Website GitHub

Re: Extract the linksort value from a link

I don’t think there is. Off the top of my head, I think you can do:

<txp:php variable="lowercase_title">
    global $thislink;
    echo $thislink['linksort'];
</txp:php>

<txp:variable name="lowercase_title" />

You can, of course, output it directly without passing it into a variable.

EDIT: hehe, just seen that you asked this one before.


TXP Builders – finely-crafted code, design and txp

Offline

#3 Yesterday 22:06:10

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,756
GitHub

Re: Extract the linksort value from a link

jakob wrote #342711:

EDIT: hehe, just seen that you asked this one before.

Time for a refreshing warm mug of learn-how-to-search…

Edit: Thanks, jakob – see you again in 5 months with the same question!

Last edited by gaekwad (Yesterday 22:22:40)

Offline

Board footer

Powered by FluxBB