Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2009-01-03 02:42:46
- MikeB
- New Member
- Registered: 2009-01-03
- Posts: 3
Reading global PHP variables into TXP:VARIABLES
I am trying to create a set of dynamic links that will allow me to load images and articles based on information passed via the URL. The filename for the image is derived from concatenating strings and is a global PHP variable. Is there a way to copy that global PHP variable to a TXP:Variable?
Offline
Re: Reading global PHP variables into TXP:VARIABLES
Attribute parsing will help:
<txp:variable name="foo" value='<txp:php>global $bar; echo $bar;</txp:php>' />
Offline
Re: Reading global PHP variables into TXP:VARIABLES
Also this method on TXP Tips might be useful.
Offline
#4 2009-01-03 12:30:13
- MikeB
- New Member
- Registered: 2009-01-03
- Posts: 3
Re: Reading global PHP variables into TXP:VARIABLES
Got it working.
Thanks….
Offline
#5 2009-01-03 15:02:20
- MikeB
- New Member
- Registered: 2009-01-03
- Posts: 3
Re: Reading global PHP variables into TXP:VARIABLES
I looked at the adi_gps plug in and installed it but can someone tell me how to use multiple arguments?
Offline
Re: Reading global PHP variables into TXP:VARIABLES
The plugin help docs are quite complete with examples, but if they do not help, why not post in the plugin thread.
Offline