Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Passing a variable straight to a tag handler in txp:php
I’m a bit of PHP newbie, so I need some help with this one. I have a bunch of articles with image IDs saved in custom field 1, that I’d like to pass straight on to the txp:image function.
Obviously <txp:image id="<txp:custom_field name="custom1" />" />
is out, so I’ve got:
<txp:php>
$coverid = custom_field (array('name' => 'Cover Image ID (Main)'));
</txp:php>
to pull out the custom field content; how can I pass it on as an ID to use with the image()
handler?
Thanks,
Rog
Offline
Re: Passing a variable straight to a tag handler in txp:php
Two possible solutions:
- Use asy_wondertag
- Read The Gordian Knot
Offline
Re: Passing a variable straight to a tag handler in txp:php
Thanks for the Gordian Knot link, I’ve got it sorted ;)
Rog
Offline