Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-09-15 13:31:22

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

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

#3 2010-09-15 13:59:38

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

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

Board footer

Powered by FluxBB