expressionengine

Passing entry_ids to channel:entries tag with low variables entries select


I'm trying to pass entry_ids to a channel entries tag using low variables entry_select. When i place the following tag by itself in a template it outputs a list of 3 pipe separated entry_ids: {exp:low_variables:single var='lv-home-groups'}

however when I add the same code to the following channel:entries tag nothing is output.

{exp:channel:entries channel="groups" entry_id="{exp:low_variables:single var='lv-home-groups'}" disable="category_fields|pagination"}
code here 
{/exp:channel:entries}

I've tried early and late parsing but can't get it to work. If i manually place the entry_ids it works fine. I'm trying to avoid using an embedded template for performance reasons.


Solution

  • Here's how: make sure early parsing is enabled for that variable, and then use the variable syntax instead of the tag syntax:

    {exp:channel:entries channel="groups" entry_id="{lv-home-groups}"}
    code here
    {/exp:channel:entries}