We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

SplitAndWrap plugin

Development and Programming

Mark Bowen's avatar
Mark Bowen
12,637 posts
16 years ago
Mark Bowen's avatar Mark Bowen
The authors are entered using Mark Huot’s multi drop-down list extension. When making a new entry, users can click from the list who authored that particular academic article. I was using SplitAndWrap to display all the articles pertaining to one author (not “posted by” author, mind you). Is there a better way to do this other than writing a new extension or SQL code from scratch?

So that we don’t take away from this great plugin and the thread for it then it might be best to start a new thread relating to this but I can see now what you have done. Personally it would have possibly been better if you had used the actual author drop-down when publishing the posts to give them the correct author as then you could keep everything within the standard built-in ExpressionEngine tags.

I am guessing that the multi-drop-down field is hard-coded or is it getting the authors from a separate weblog?

Actually thinking some more I’m wondering if the search://name_of_your_custom_author_field=”“ parameter would work on this one maybe? May not as you are using a 3rd party drop-down extension which may not work with that parameter although if it does then this might be a way to go perhaps?

You are going to need to make the list of authors first so depending on where or how they are stored your best bet in this scenario might be a SQL query using DISTINCT so that you don’t get repeats.

Best wishes,

Mark

       
leadsuccess's avatar
leadsuccess
408 posts
16 years ago
leadsuccess's avatar leadsuccess

Maybe even a grab first result, so you don’t get all the returns just one. (e.g. butter, milk, bread)

{exp:splitandwrap char="," str="butter,milk,bread" grab="1"}
  {splitted}
{/exp:splitandwrap}

Would return: milk

That would come in handy in a few places where I allow multiple selections and only can use one.

       
1 2

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.