Thanks.
Actually, I don’t think {{ if eq .Section "vX.Y" }}
will help us because the root section directories aren’t versioned. They have child version subdirectories. However, we think we can bypass this hurdle by parsing the page URL. What we don’t know is how to do the “override global version site param” part.
I’m still stuck with the following issue: because menu IDs need to be unique across a doc section, and we have multiple version subdirectories in each section, we need to use a version ID in the main-menu identiifer
and parent
values (which we configure in the page’s front matter). Now, if we create a new vX.Y/ directory from a latest-release/ directory when a new version is released, we need to edit all the main-menu identifier
and parent
front-matter configurations in the new directory. If we could set these values from a template, we could use custom front-matter params to set the unique non-versioned values, and append the version number to create the identifier
and parent
values, but we don’t know how to set these values from a template (we only know how to set them directly in the front matter) … .
I looked at the thread that you mentioned — Nested Shortcodes - Get Furthest/Farthest Parent Param. It looks interesting but it’s a bit complex for me to understand right of the bat. I’ll need to study it more thoroughly when I have the time. I’m not sure it will help me with this specific issue, but it might be useful for other tasks.