Timeline for How to achieve without nested channel:entries tags
Current License: CC BY-SA 4.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 7, 2018 at 6:44 | comment | added | jrothafer | Pretty much, your method is an acceptable implementation as long as you don't have a very great number of categories. Some context would've helped me answer your question, like range of number of categories and range of number of entries per category, I might have some other thoughts, but I think you're all set. Rock on. | |
Dec 6, 2018 at 16:10 | comment | added | thisyONE | Thanks for the feedback. Truth is, I have never actually observed poor performance from using these nested loops. I just recently found some posts that indicate that nested loops are problematic so I wanted to find out if there are any best practice solutions. I am surprised EE doesn't provide a dedicated means to achieve this - it is something I have a frequent need for (cycling through multiple categories to grab content that can then be displayed in category-related sections). | |
Dec 5, 2018 at 21:08 | comment | added | jrothafer |
Well, then the only way to be more efficient running that dynamically would be to write a query with the exp:query tag or write a plugin/add-on. And if you are going to do it the way you're trying to avoid in your question, and you are grabbing so many categories and entries that you have to worry about overhead, you should probably rethink your design. The next option is to look into caching.
|
|
Dec 5, 2018 at 19:57 | comment | added | thisyONE | I have always passed over using the channel:category_archives tag due to it not offering enough flexibility. It appears the only content it can grab from entries is from the title or title_url fields. | |
Dec 4, 2018 at 23:51 | history | answered | jrothafer | CC BY-SA 4.0 |