The community member wants to use the dynamic URL feature to build a navigation for a documentation site. They are unsure how to use the system.origin inside a collection nested in a slot that iterates over a list of strings used as dynamic URL tokens. The comments suggest that variables defined outside the slot, like system, cannot be used inside the slot. Instead, the community members are advised to use relative URLs like /docs/thingy rather than system.origin. The comments also discuss how the binding in the Href field should look and that relative URLs will work on the live site, even though they may show the builder URL in the builder.
Hey, I want to use the dynamic URL feature and need to build a navigation to reach the dynamic pages. (at least I think I do, correct me if wrong) How can I use the system.origin inside a collection (nested in a slot) that iterates over the list of strings I use as my dynamic URL token thingy.
My idea is to basically build a simple documentation site with a nav bar on the left that leads to the pages of the single entries. Thanks!
Vars defined outside the slot like system can't be used in side the slot. But why do you need system.origin? That's just the current URL so you can just use relative URL like /docs/thingy
How would the binding in the Href field look like? I thought I would need the full url for that. if I just type "/documentation/"+Collection Item it does not work.
relative urls piggy back off of the current website you're on. So because you're in the builder its showing the builder url but on the live site itll show the live site url.
When you navigate to this link in the builder it should navigate you to the proper page, does it not?