I’m having trouble getting a stash variable to work as a parameter in a channel entries loop. I have not had this problem before so I wonder if it may have something to do with the nature of the variable. It is coming from javascript code and it is called by the code . This produces the result of a city selected elsewhere on the page (for example, Portland). Since that code can’t be used in the channel entries tag I am using the following stash code:
{exp:stash:set
name="city1"
parse_tags="yes"
process="end"
trim="yes"}
<label class="city"></label>
{/exp:stash:set}
This seems to work correctly and both {exp:stash:city1} and {exp:stash:get:blah name='city1’} produce the result of the selected city (for example, Portland). But it doesn’t work in the following expressionengine code:
{exp:channel:entries
channel="place"
search:city="{exp:stash:get:blah name='city1'}"
parse="inward"
dynamic="no"}
{title}
<br />
{if no_results}
No results
{/if}
{/exp:channel:entries}
I’ve tried as many variants as I can think of using additional stash parameters but I need help.
Thanks, Geoff