Skip to content

Instantly share code, notes, and snippets.

@moonbeetle
Created January 25, 2013 23:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moonbeetle/4638966 to your computer and use it in GitHub Desktop.
Save moonbeetle/4638966 to your computer and use it in GitHub Desktop.
EE + Channel Rating + Stash: Using Stash to pass entry_id's for top rated channel entries in another channel entries loop
In the template: (beware of whitespace!!)
{exp:stash:set parse_tags="yes" output="no" save="yes" type="snippet"}
{stash:recipe_entry_ids}
{exp:channel_ratings:top_entries channel="recipes" limit="3" backspace="1"}{rating:entry_id}|{/exp:channel_ratings:top_entries}
{/stash:recipe_entry_ids}
{/exp:stash:set}
Then in the wrapper embed...
{exp:channel:entries
channel="recipes"
disable="categories|category_fields|member_data|pagination"
cache="no"
limit="3"
fixed_order='{recipe_entry_ids}'
dynamic="no"
}
// Do stuff including the Assets custom field
{/exp:channel:entries}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment