Join the Webstudio community

Updated 2 months ago

Dynamic Page Path Transformation

At a glance

The community member is asking if it's possible to use a dynamic page path variable (e.g. /page/:name) and apply a transformation to the variable before displaying it in a component. The example given is that for the URL /page/what-is-this, the system.params.name variable would be what-is-this, but the community member would like to display What is this instead. The community member suggests that this could potentially be done by integrating a (fake) CMS that would handle the transformation.

In the comments, another community member suggests a potential workaround using a Resource with a simple endpoint that would transform the given system variable to the desired format, and then bind the response to objects.

Hi, is it possible to use a dynamic page path variable e.g. /page/:name bound to an element and apply some transformation to it in the process? e.g. for /page/what-is-this the system.params.name variable would be what-is-this but I'd like to show What is this in a component. Is this possible? I can't find a way to apply transformations but perhaps it could be done by integrating a (fake) cms that would transform it?
k
1 comment
If there is no better alternative I think I might have a workaround i.e. using a Resource with a simple endpoint that will transform the given system variable to what I want and then binding the response to objects
Add a reply
Sign up and join the conversation on Discord