Hi everyone -
I’ve got a custom state that evaluates to an option in an option set. I’d like to use a URL parameter when a page is loaded to set that state and display whatever the chosen option is in a dropdown.
It looks like I can do this if the parameter passed is the same attribute as is displayed in the drop down; but it’s not working if I choose a different attribute as the parameter (does that make sense?)
So, for example:
Option set: Locations
Option: Los Angeles, CA
Display (text): Los Angeles, CA
Text Param (text attribute): los-angeles-rentals
On the homepage, the user chooses Los Angeles, CA from a dropdown, which sends a parameter (L=options’ Text Param) to a listing page, resulting in domain.com/listings/L=los-angeles-rentals
On the listings page, I have a custom state Location that evaluations to a Location option, and a dropdown that displays Location’s Option’s Display. The initial content is set to display page’s Location custom state.
I have a workflow to set the Location to Get L from page URL, but it’s not working.
I did get it to work by passing the same Display text all the way through the parameter (domain.com/listings/L=los angeles ca), but that doesn’t look as nice and isn’t as SEO friendly.
Is this just not possible if you’re using different attributes of the same option? Additionally, is there a way to do this simply through a path and not through a parameter?
Thanks for any help!