I have a Structure section and a Channel section.
Entries in the Channel will be listed on one of the Structure Entries, and it's entry page will fit the same URL format.
So for example, the Structure Entry may be:
Title: "Our People"
URL: /about/our-people"
...and the Channel entry may be:
Title: "Jamie"
URL: /about/our-people/{slug}
When I set up the Channel is there any way of dynamically setting it's "Entry URL Format" based on another entry's URL/slug? I can set it to "/about/our-people/{slug}" but if the Structure entry's slug ever changes it'll be wrong.
I've tried adding the following to the Channel's Entry URL Format field and it seems to work (high fives P&T).
{% set parent = craft.entries.section('site').id('32').first() %}{{ parent.uri }}/{slug}
Is there anything I should be worried about using that? Obviously if that parent entry is deleted things will break. Anything else?
/about/our-people/{slug}
would still work after you change the structure's slug to, let's say/about/team
. Only thing that changes is, yep, the url to the structure entry. Just don't link to your entries with relative URLs (you probably wouldn't anyways, just saying).