Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Filter out multiple values in a custom field... is it possible?
Is there a plugin (or native txp way) that will help me drill down into comma separated values in a custom field?
For example, a custom field might contain:
Monday, 8:00 – 9:15 am, Gentle Yoga, New Class!
I’m thinking about trying to use article_custom tags and plugins like smd_if to search for articles with a custom field that contains “Monday”. Then, somehow I want to pick out and output the remaining values in the custom field in specific places within my article form. Note: I do not want to just output the comma separated list. I want to pull out the time (the second value in the custom field) and put it in one place wrapped in a particular div or table tags, then pull out the third value of the custom field (the name of the class) and put it in another place within my article form, etc.
So, I’m curious, does anything already exist that will help me do this? I’ve searched throughout the forums and plugins and can’t find what I’m looking for…. but I have a vague (or made up) memory that there was once something that could do this….
Any suggestions or answers are most appreciated!
p.s. – on top of this, I also want to be able to compare the name of the 3rd value (the class name) with existing article titles. If there is an article titled “Gentle Yoga” in the “Classes” section of the site, then I want to permlink the name of the class to that corresponding article. :)
Last edited by photonomad (2011-03-23 03:16:52)
Offline
Re: Filter out multiple values in a custom field... is it possible?
This is the plugin: sed_pcf.
…Prrrrrrrr…
Offline
#3 2011-03-23 09:54:19
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: Filter out multiple values in a custom field... is it possible?
photonomad wrote:
Is there a plugin (or native txp way) that will help me drill down into comma separated values in a custom field?
Hi,
you can try also using the new if_custom_fields attributes introduced by txp 4.3.
Offline
Re: Filter out multiple values in a custom field... is it possible?
Thank you TNT and redbot!
Offline