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
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.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.