Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#13 2009-11-03 09:19:22
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: having urls in custom fields
I think its a problem with nested quotes. Try this:
<h4><a href='<txp:site_url /><txp:php>echo strtolower(<txp:custom_field name="article_form" />);</txp:php>
'><txp:custom_field name="article_form" /></a></h4>
(note the single quotes)
edit: Doh! Never post when still not wide awake. Please ignore this answer and read below
Last edited by redbot (2009-11-03 09:36:02)
Offline
Re: having urls in custom fields
Use the function name instead of the tag inside PHP blocks. Like this:
<h4><a href="<txp:site_url /><txp:php>echo strtolower(custom_field(array('name' => 'article_form')));</txp:php>
"><txp:custom_field name="article_form" /></a></h4>
I keep meaning to add this to Textbook somewhere. Must find a slot for it one day.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline