Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-11-17 20:43:00

the-bhp
Member
Registered: 2005-10-18
Posts: 26

Display the contents of a custom field in an article list?

I use chh_article_custom to display a list of articles from multiple sections. I have a form called article_list in which I use txp:custom_field, but the tag doesn’t output anything. I also tried mem_article_custom, but it’s the same problem. Using the standard article_custom tag it works, but I need the multiple sections support.
What should I do?

Offline

#2 2005-11-17 21:53:27

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Display the contents of a custom field in an article list?

As far as I know <txp:custom_field name="CustomFieldName" /> should work in an article form. The name should be exactly as you set it in Advanced preferences, or if you didn’t name them, custom_1, custom_2 etc.

Offline

#3 2005-11-18 18:54:40

the-bhp
Member
Registered: 2005-10-18
Posts: 26

Re: Display the contents of a custom field in an article list?

Yes, txp:custom_field does work in article forms, but chh_article_custom and mem_article_custom can’t deal with it as it seems.

But my problem has been solved another way: Having multiple sections assigned, both chh_article_custom and mem_article_custom seem to sort the articles by section first, and then by the criteria given in the “sortby” attribute.

So,
<code><txp:chh_article_custom section=“section1,section2” /></code>
gets me the same results as
<code><txp:article_custom section=“section1” />
<txp:article_custom section=“section2” /></code>.

Kinda unsatisfying.

Offline

Board footer

Powered by FluxBB