Changing Layouts Based on URL Path not working with all options

Hello Guys,
In the docs it says that " using {{dc:url:path}} and even {{dc:url:full_path}} you could filter based on a directory or existance of a word."
I have noticed that when i try to assign a woo layout to a image
It works well as well as if i assign it a a specific query var like:
image
But once i try to filter out based on the example in the docs:
image
And assign that to a woo commerce layout, it doesn’t work. It gets rerouted back to the main shop loop/assigment
Am I missing something or this is the expected behavior? If so, can you give me some context what am i doing wrong? For example we want to assign a custom layout for all products that include something in the URL, how do we go about that?

Cheers,
Alex

Hey Alex,

In your screenshot, you’re using the in condition. We don’t have that example in our doc.

Try reversing the condition in your current setup because theoretically, you should be looking for some_value_in_URL IN the_full_URL

image

I tested that in my test site and it works.

image

Hey Christian,

Thank you so much . Of course the whole string url will not be part of the smaller string, but it was the second pair of eyes that helped. Sometimes late evening tiredness can make us overlook simple details like that, and I feel comical about myself after :smile:

Worked like a charm!

Best regards,
Alex

You are most welcome, Alex.
We are glad @Christian was able to help you out.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.