Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2006-09-08 09:54:13
- freshface
- Member
- Registered: 2006-08-23
- Posts: 49
Can I use php in article_custom?
Like this:
<code>
<txp:article_custom category=”<?php $x = $_GET[‘x’]; echo $x; ?>” sortby=“Posted” sortdir=“desc” form=“wab_featured_artists” listform=“wab_featured_artist” limit=“1” />
</code>
Offline
Re: Can I use php in article_custom?
I assume you tried and it didn’t work. Try this:
<code><txp:php>echo article_custom(array(‘category’ => gps(‘x’), ‘sortby’ => ‘Posted’, ‘sortdir’ => ‘desc’, ‘form’ => ‘wab_featured_artists’, ‘listform’ => ‘wab_featured_artist’, ‘limit’ => ‘1’)); </txp:php></code>
Offline
Re: Can I use php in article_custom?
No. Use of php-style delimiters is deprecated anyhow (in favour of txp:php tyle tags). And there’s an entry in the FAQ about using tags as attributes, commonly described as “tags in tags”.
Offline
#4 2006-09-08 10:14:54
- freshface
- Member
- Registered: 2006-08-23
- Posts: 49
Re: Can I use php in article_custom?
Sweet Ruud, works like a charm!
Offline
#5 2006-09-08 10:15:24
- freshface
- Member
- Registered: 2006-08-23
- Posts: 49
Re: Can I use php in article_custom?
I will check it out sencer.
Offline
Pages: 1