Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Use custom fields in txp:aticle or txp:custom_article
I’m having some problems using custom fields.
To create a list of articles where the custom field “custom1” have the value “true” I’ve used the following:
<txp:article_custom custom1=“true” />
This works, listing those articles that match the value above. However, I’m getting the following error:
An error occurred in the following tag: <txp:article_custom custom1=“true” /> -> Textpattern Notice: unknown_attribute: custom1 on line 582
What am I doing wrong? I’ve tried re-naming the custom field, but this makes no difference.
Offline
Re: Use custom fields in txp:aticle or txp:custom_article
Isn’t it custom_1 instead of custom1?
Last edited by ruud (2006-10-18 10:53:22)
Offline
Re: Use custom fields in txp:aticle or txp:custom_article
custom_1 works too, but I still get the same error.
I’m guessing I can refer to the first custom field in two ways, “custom_1” or the text label that’s defined under admin preferences.
Offline
Re: Use custom fields in txp:aticle or txp:custom_article
ruud wrote:
Isn’t it custom_1 instead of custom1?
It is whatever you name it in the preferences (txp:article eats all custom attributes by preferences name, not by database column name), and I further think this is a condition which is not accounted for here while using lAtts.
Fix due in 4.0.5?
Offline
Re: Use custom fields in txp:aticle or txp:custom_article
wet is right, the warning comes from the lAtts function.
So for now you can ignore the warning if you know that the attribute is correct and if it’s working as you intend. When you switch the site status to ‘live’, the warning will disappear.
Offline
Re: Use custom fields in txp:aticle or txp:custom_article
I will post an enhancement request. Maybe somebody’s already awake after yesterdays release party ;-)
Offline
#7 2006-10-19 18:15:30
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Use custom fields in txp:aticle or txp:custom_article
I’ll fix that right now.
Offline