Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2007-07-01 12:18:57
- LoganX
- New Member
- From: Ukraine
- Registered: 2007-07-01
- Posts: 4
How can i convert result of category_list to plain text
How can i convert result of “category_list” to plain text to use later in “zem_contact_select” list. Also needed for articles titles list
Thank you
Last edited by LoganX (2007-07-01 12:34:23)
Offline
Re: How can i convert result of category_list to plain text
It’s probably easier to skip the category_list tag and directly pull the categories from the txp_category table, join the result array using a comma and use that as attribute value for zem_contact_select, especially if you plan on using txp:php to do this:
<txp:php>
echo zem_contact_select(array('list' => join(',', safe_column('name', 'txp_category', '1=1'))));
</txp:php
Last edited by ruud (2007-07-01 15:11:30)
Offline
#3 2007-07-01 14:09:12
- LoganX
- New Member
- From: Ukraine
- Registered: 2007-07-01
- Posts: 4
Re: How can i convert result of category_list to plain text
Unfortunately after this in list appears only record “Array” :(
Offline
Re: How can i convert result of category_list to plain text
Oops, code corrected, try again.
Offline
#5 2007-07-01 15:44:11
- LoganX
- New Member
- From: Ukraine
- Registered: 2007-07-01
- Posts: 4
Re: How can i convert result of category_list to plain text
Wow!!! Great thanx!
Is it real to do the same with article titles?
Offline
#6 2007-07-01 16:30:27
- LoganX
- New Member
- From: Ukraine
- Registered: 2007-07-01
- Posts: 4
Re: How can i convert result of category_list to plain text
Figured out myself :)
<txp:php>
echo zem_contact_select(array('list' => join(',', safe_column('title', 'textpattern', "section='catalog'"))));
</txp:php>
2 Ruud
Thank you very much
Offline