1

So, have a exp:stash:set_list chock full of entries, I'm using them all over the site and on this one I need to show a limit of 3 (simple), random (simple) BUT we need to not show some entries.

This would be how I'd go about it if stash worked like EE but I know it wont work, wondering what sort of regex would be required.

//I know this will fail
{exp:stash:get_list name="prod_list" limit="3" orderby="random" scope="site" match="not 32|244|2|66" against="entry_ids"}
… show the stuff
{/exp:stash:get_list}

1 Answer 1

3

For others and my future self, here's the regex solution:

{exp:stash:get_list name="prod_list"
    limit="3"
    match="#^((?!.*(32|244|2|66|etc)).*)$#"
    against="entryid"
    orderby="random"
    scope="site"}
        … spit out entries
{/exp:stash:get_list}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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