Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2012-06-29 04:00:50
- piyashrija
- Member
- Registered: 2012-05-17
- Posts: 30
custom field data manipulate
I am newbie to textpattern ..no sure whether this question is asked before
I am in individual article page that relates to particular event.
i am pulling out venue information from a custom field like
<txp:custom_field name=“venue”/>
information it contain is in pattern as below
1111111111,abd:222222222222,abd:3333333333(output from custom field venue)
now i need to get just 3333333333;
how to do it .
i did with use of txp:php tag but i am not able to manipulate the output value from text pattern tag
Thanks
Offline
#2 2012-06-29 06:02:39
- mmelon
- Member
- Registered: 2006-03-02
- Posts: 95
Re: custom field data manipulate
hmmn i think rah repeat will let you split custom field data on the comma.
then you could do a test for a : and remove the first 4 characters using stristr and substr.
Not sure how you would decide which of the abd:XXXXXX strings you are looking for?
also steph’s plugins do nearly everything.
smd_each will probably help you out.
Mike
Offline
Re: custom field data manipulate
piyashrija wrote:
i did with use of txp:php tag but i am not able to manipulate the output value from text pattern tag
just put it in <txp:variable />
inside your <txp:php>
block, then use this <txp:variable />
in other tags:
...
global $variable;
$variable['my_string'] = 'your_string';
...
Offline
Pages: 1