ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Homepage Curator Ideas

June 29, 2012 12:45am

Subscribe [3]
  • #1 / Jun 29, 2012 12:45am

    jbulin

    2 posts

    I’ve been struggling with this problem of curating content to a homepage. Were talking about 15+ positions that change daily not based on most recent or most popular or anything within the entry itself but on the whim of an editor. The editor could go and apply a custom status or category to each of the items each day—but that is a pain and would also allow non-editors access to curation. It would be much better to have one place to select the featured items for that day and even program future days.

    I thought of maybe using Playa in some way but haven’t quite wrapped my head around how to make that work. Anyone know of any add-ons out there that do this or other solutions?

  • #2 / Jun 29, 2012 10:55am

    aelvan

    33 posts

    My initial thought is to use something like low variables to set up one or more “channel entries” variables for the different types of content to display on the frontpage. How you’d set this up, and the logic of how you output the content in the right places would largely depend on the actual requirements, but let’s keep it simple and say that the editor selects 15+ entries, and that the order of them should determine where they go.

    So, say you want the first one to go into a large block at the top, then the next three in columns below that, then two semi-big blocks below that, and then the rest as a list of some sort. Here’s a quick sketch of what the template would look like:

    {exp:channel:entries entry_id="{lv_frontpage_items}" fixed_order="{lv_frontpage_items}" dynamic="no" limit="1"}
          <div class="large-block">{title}</div>
        {/exp:channel:entries}
    
        {exp:channel:entries entry_id="{lv_frontpage_items}" fixed_order="{lv_frontpage_items}" dynamic="no" limit="3" offset="1"}
          <div class="three-column-block">{title}</div>
        {/exp:channel:entries}
    
        {exp:channel:entries entry_id="{lv_frontpage_items}" fixed_order="{lv_frontpage_items}" dynamic="no" limit="2" offset="4"}
          <div class="two-column-block">{title}</div>
        {/exp:channel:entries}
    
        {exp:channel:entries entry_id="{lv_frontpage_items}" fixed_order="{lv_frontpage_items}" dynamic="no" offset="6"}
          <div class="list-item">{title}</div>
        {/exp:channel:entries}

    {lv_frontpage_items} is a “channel entries” low variable (could also be Playa, but Channel Entries comes with LV), and has to be early parsed for this to work. You could of course make several different variables for different types of content, add statuses for some things, etc. As I said, depends on the actual case.

    But, to program this into the future is maybe not possible if you go this route. For that I think I instead would have made a new channel named “Frontpage layout” or something, that the editor could post to. I’d use custom fields the same way as in Low Variables (but would have to use Playa), and then get the newest entry from that channel, excluding future entries, and output much the same way as above. This way the editor can make new entries and set them to a future date, and as soon as that date is reached, that entry will be used to generate the frontpage.

    Don’t know how much of that made sense, but.. 😊 Hope some of it can get you on the right track.

  • #3 / Jun 29, 2012 10:59am

    aelvan

    33 posts

    Ah forgot, it’s of course a little bit bad performancewise to do the four queries as I did it above. If possible you could use just one exp:channel:entries and use conditionals to output things differently. Or even better, push everything into a Stash list and use context to output it correctly. But for the sake of clarity, I kept it simple. 😊

  • #4 / Jun 29, 2012 11:40am

    jbulin

    2 posts

    I think that makes sense. I had thought of creating a featured homepage channel and each entry would be a day’s featured items but wasn’t sure what I would use to make that actually function. I’m curious how other news/media orgs who use ee handle the featured content on their homepages.

  • #5 / Jul 03, 2012 12:36pm

    John St-Amand

    865 posts

    jbulin, yes, I’ve done that same sort of thing using Playa.  It was a simple and easy way to create an entry that then allows you to create within in a group of entries from one or more channels in this way.  And of course because your selection of your 15 items is a single entry with a standard EE entry fields, you can post-date items and have them self-publish, allowing you to pick them ahead of time.  It certainly does give you the functionality you’re looking for.

  • #6 / Jul 03, 2012 12:42pm

    jbulin

    2 posts

    John - With Playa were you able to output more than just the title of the entry? For example were you able to use Playa to manage a dynamic lead/slider?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases