Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Does article_custom not work within articles?
I want to pass the ID of an article via a custom field to a <txp:article_custom /> so that it displays the link and excerpt of that article:
<txp:if_custom_field name=“Article_ID” >
<txp:article_custom form=“list” id=’<txp:custom_field name=“Article_ID” />’ />
</txp:if_custom_field>
This doesn’t seem to work.
Any other ways?
Thanks in advance!
Offline
Re: Does article_custom not work within articles?
lozmatic wrote:
This doesn’t seem to work.
Does it work if you put the custom field name in all lower case in your code? I think it should work. TXP converts the custom field names to lower case (internally).
Last edited by Bloke (2010-04-21 14:21:27)
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
#3 2010-04-21 16:53:49
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Does article_custom not work within articles?
Custom field names may include letters (uppercase or lowercase), numbers and under_scores, but no spaces or other special characters.
Maybe ‘article_id’ is one of the no-go custom field names?
And is that code in an article form (or inside the container tag), or in the article body?
Last edited by els (2010-04-21 16:54:42)
Offline
Re: Does article_custom not work within articles?
Bloke wrote:
Does it work if you put the custom field name in all lower case in your code? I think it should work. TXP converts the custom field names to lower case (internally).
<txp:custom_field name=“Article_ID” /> alone returns the correct value, so this is not the problem.
Els wrote:
And is that code in an article form (or inside the container tag), or in the article body?
It’s in the article body, actually. I should have tested the tag in the form! Can’t do it now ‘cause I’m at work. Will do later.
Thanks.
Offline