0

I'm using low:events:entries. I have a page that shows the next upcoming featured event as a picture, then underneath it a list of events, both featured and non-featured. My next upcoming featured event is showing up both in the picture and in the list, and I'd like it to not show up in the list since that looks like a duplicate.

It's under "Upcoming Events" at www.fcs.uga.edu.

I've tried using the entry_id="not {lv_exclude_id}" parameter when making the list, defining lv_exclude_id, an early-parsed Low Variable, as:

{exp:low_events:entries channel="events" show_passed="no" search:events_front_page_feature="Yes" limit="1"}
{entry_id}
{/exp:low_events:entries}

(The same tag that brings up my one featured event.)

But that's not working. Maybe seeding one low:events:entries with another isn't the way to do this. Any ideas?

2

Using an early parsed var (or a Snippet for that matter) like that doesn't work. To illustrate, using the var you geva as an example, and using it like this:

{exp:low_events:entries entry_id="not {lv_exclude_id}"}
    ...
{/exp:low_events:entries}

...will result in this code when we come to the stage where tags are parsed:

{exp:low_events:entries entry_id="not {exp:low_events:entries channel="events" show_passed="no" search:events_front_page_feature="Yes" limit="1"}
        {entry_id}
    {/exp:low_events:entries}"}
    ...
{/exp:low_events:entries}

You can see why this will not work.

So, to work around it, you'd need to use either an embed, or something like Stash.

| improve this answer | |
  • I actually tried Stash and an embed, as well, and neither worked. Both are outputting the correct value right before I open the low_events:entries tag, but inside the tag defining entry_id="not {embed or stash reference}" something must be going wrong. Parse order I assume? – jphansen May 12 '14 at 18:30
  • You should be looking at something like entry_id="not {embed:entry_id}" instead of putting the actual embed tag in there. Check out the docs on embeds/layouts on the EE site. – Low May 13 '14 at 9:31
  • That worked, thanks. I was passing the embed (which returned a value) as a parameter in low:events:entries, when I should have included the entire low:events:entries block in an embed like {embed="embeds/include_latest_events" exclude_id="{exp:stash:get name="exclude_id"}"}. – jphansen May 13 '14 at 13:19

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.