Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Sorting Articles by Custom Field Data (or something else)
I will have articles which need to have one or more US State applied to them in some way (OH, OK, OR, etc…).
I’ve started by doing this using categories for each State. I wonder if I could use a custom field instead, where you could enter in a comma separated list of applicable States for that article. Ideally I could avoid using Sections and Cats to define States.
The problems then, is that I don’t know how to then build navigation to sort through articles by State using the custom field data.
Has anyone out there gone through the process of doing something akin to this? I’d appreciate any links or suggestions. I’m open to different ways of going about this. Thanks.
txtstrap (Textpattern + Twitter Bootstrap + etc…)
Offline
Re: Sorting Articles by Custom Field Data (or something else)
I’m toying with aam_split_custom_field right now which may be the right solution.
txtstrap (Textpattern + Twitter Bootstrap + etc…)
Offline
#3 2008-06-12 02:17:18
- progre55
- Member
- Registered: 2006-05-02
- Posts: 668
Re: Sorting Articles by Custom Field Data (or something else)
whaleen:
Take a look at Gerhard’s Custom Field Plug In
Not sure if this helps, but it may open up some additional ideas for your project.
progre55
Offline
Offline
Re: Sorting Articles by Custom Field Data (or something else)
If you can hang on for a few hours I’m just putting the finishing touches to smd_each. It allows you to iterate over values so if you had your states in a custom field you could build a list of them and display it. You could even put checkboxes next to each one (or use a multi select list) and then for each one selected on submit, you can take some action.
If you think that might be of use to you, watch the forum in the next few hours. Not sure if it’s quite what you’re looking for but it might be useful.
Last edited by Bloke (2008-06-12 12:59:49)
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
Re: Sorting Articles by Custom Field Data (or something else)
@ progre55 – glz_custom_fields is perfect for my needs. I’ve meant to buy it in the past but your mention was the final nudge.
@ zero – tru_tags occurred to me as a option but I wanted to save keywords for… ‘keywords’. :)
@ Bloke – smd_each IS gonna jive with glz_custom_fields? Sounds like a perfect counterpart to it if it does what I am dreaming it does.
glz_custom_fields kicks ass! It’s definately worth the $20, no doubt. Thanks all for the help. I’m off to see smd_each now…
txtstrap (Textpattern + Twitter Bootstrap + etc…)
Offline
Re: Sorting Articles by Custom Field Data (or something else)
whaleen wrote:
smd_each IS gonna jive with glz_custom_fields?
If you employ Gerhard’s tiny modification to the core then yes, his variables become available to the page and smd_each (and smd_if) can take advantage of them.
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
Re: Sorting Articles by Custom Field Data (or something else)
his variables become available
This plain logic is on my horizon. I’m really getting alot out of your documentation in regards to TXP logic and PHP in general. I was never a logic programmer but am aiming at it still. Gradually. I’ll report back with some examples of my implementation of your plugin and Gerhard’s working together. The tagging power in TXP currently is expanding! Thanks Stef.
txtstrap (Textpattern + Twitter Bootstrap + etc…)
Offline