Custom URI to exclude entries in structure I have a structure where the Entry URI Format is {parent.uri}/{slug} - what I'm looking to do is conditionally not include entry slugs within the uri based on a show/hide setting in the entry.

For example, I might have structure where an entry, sub-page2 has a uri like so page/sub-page/sub-page2 but if there is a setting on sub-page to exclude it, it's uri should be page/sub-page2

This would mean that the conditional to show it should only be considered if it's being called as a parent. sub-page should still be accessible from page/sub-page - trying to find a way to achieve this?
You have the full power of Twig in your template to render the entries Uri so you can conditionally render what you want. This could be your template in your section settings 

{% if object.parent.field == true %}{{ object.parent.uri }}{% else %}{{object.parent.slug}}{% endif %}


There are no real limitations since you can do what you are used to in Twig in your frontend