Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Why won't this work?
I’m trying to load a variable as the value for a custom field in a <txp:article_custom> tag but it is not working, and idea why?
<txp:variable name="child" value="<txp:custom_field name='related_products' />" />
<txp:article_custom related_products="<txp:variable name='child' />" sort="title desc" limit="999">
<h1>THIS WORKS</h1>
</txp:article_custom>
Thanks for any help,
Phil
Offline
#2 2010-09-15 13:47:53
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,315
Re: Why won't this work?
You pasted this? Double quotes vs. single quotes.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: Why won't this work?
Ah ha! Yes, I have the ‘ and “ round the wrong way in some attributes. It works now with:
<txp:variable name="child" value='<txp:custom_field name="related_products" />' />
<txp:article_custom related_products='<txp:variable name="child" />' sort="title desc" limit="999">
<h1>THIS WORKS</h1>
</txp:article_custom>
Cheers uli.
Offline
Pages: 1