Using an IF-statement to define the Entry URL Format 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?
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.