Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2009-06-16 10:26:38
- thijsma
- Member
- Registered: 2008-08-18
- Posts: 13
Get info from a link whit php
i want a php line that get’s the sort value of a link.
i want to use the sort value to make a visual rating so with some php
something like this:
IF sort value equals 1 { ECHO <SPAN class“HIGHLIGHT”> LINK </SPAN>
I don’t know much of php but i assume this can’t be to hard
i want to use the php handlers <txp:php></txp:php>
Offline
Re: Get info from a link whit php
You can use wet_linkinfo to grab the linksort value. In combination with txp:variable and txp:if_variable you should be able to test for its value.
If you want to do it via txp:php
, the global variable for the linksort property of the current link is $thislink['linksort']
.
TXP Builders – finely-crafted code, design and txp
Offline
#3 2009-06-16 11:21:03
- thijsma
- Member
- Registered: 2008-08-18
- Posts: 13
Re: Get info from a link whit php
thanks, but
in de wet_linkinfo plugin, hou can i make a list of my links when you have to asign a specific id?
Offline
Re: Get info from a link whit php
See txp:linklist (see also the general tag ref page) or other link list plugins in the txp resources. You use wet_linkinfo within a link form used by txp:linklist.
TXP Builders – finely-crafted code, design and txp
Offline
#5 2009-06-16 12:54:59
- thijsma
- Member
- Registered: 2008-08-18
- Posts: 13
Re: Get info from a link whit php
but in the form you always have to asign a specific id to use the wet_linkinfo plugin?
Offline
Pages: 1