We use tagPath for everything and I'd like to figure out a clean way to pass a tagPath parameter to a page URL such as /node/:tagPath. However per the docs and common sense, / is a disallowed character in a URL parameter. Any simple ways people have substituted or worked around this?
For now, all our nav is done to views rather than URLs, but I like the representational state aspect of a URL whenever possible.
I mean it's simple to take in a tagPathEscaped parameter via URL, then do a simple replace({view.params.tagPathEscaped},"~","/") expression to convert to a valid tagPath.
But I can hear you saying "bleghh" to that and I was hoping for a more glamorous solution to escaped urls such as data/perspective/client/project/node/Path~to~tag~right~here
Yeah, Ignition allows a lot of characters in tag names that aren't legal in URLs. If you use the standardized encode/decode tools, you won't miss anything that will need fixing later. Hmmm?
And of course there's already an expression that takes care of that. There's always some new expression to find. urlEncode | Ignition User Manual
urlEncode('Path/to/tag/right/here'), used to create a URL nav such as data/perspective/client/project/node/Path%2Fto%2Ftag%2Fright%2Fhere
loads right into view.params.tagPath decoded and ready to use.
Not pretty, but representational and back button/bookmark friendly. Now I feel like an amateur for asking this in the first place. There's always expression functions in the banana stand.