Within a channel I have two kinds of possible article types, which I separate with the entry type feature. For the entry URL format I want to include the type, but only for one of the two.

I've tried channel{% if type.handle == 'xyz' %}/{type}{% endif %}/{slug} but without success.

I've tested "if 2 > 1" and it did output the type, so I guess the structure of the if-statement is correct. Does anyone have an idea how I could make this work?

1 Answer 1


Alright, I was able to figure it out myself:

channel{% if object.type == 'xyz' %}/{type}{% endif %}/{slug}

produces the desired results. The section for Dynamic Entry Titles in the docs pointed me into the right direction.

Your Answer

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

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