1

Situation: A channel tag gets feeded by an array of author ID's, thus outputting all entrees of the selected authors.

Problem: I must restrict these entrees to one per author.

Solution: Should we use a PHP script to hide or delete entrees? Or are there other methodes we could use?

I found a simulair question here How to show recent entries restricted to one per author? but I do not know how to implement it.

My code is like this -where {exp:stash:AllLetterAuthor} produces a pipeline separated array of author_id-:

    {exp:stash:parse
process="end"
scope="local"
replace="yes"
save="no"
refresh="1"
}
    {exp:channel:entries
                                    channel="my_channel-1|my_channel-2"
                                    disable="pagination|category-fields|member-data"
                                    dynamic="no"
                                    author_id="{exp:stash:AllLetterAuthor}"
                                    parse="inward"
                                    }
                                    {my_field}
                {/exp:channel:entries}
{/exp:stash:parse}

The above code works, I get all the publications of the authors, but I want only one per author.

I hope someone can help me here, thank you very much!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.