Join the Webstudio community

Updated 6 months ago

Access System Variables in Slots

At a glance

The community member is asking if there is a way for slots to access system variables, specifically the language code parameters from the URL. They need this functionality to set the navigation links correctly. The comments indicate that this is not currently possible, but may be possible in the future with custom components. One community member suggests that @TrySound may have a workaround, but no definitive answer is provided.

Hello, is there a way for slots to access system variables? I need for the slot with nav menu inside to have acess to language code params from url. So when users is clicking on nav links, the link are set like this "/" + system.params.code + CollectionItem["Navigation_Item_id"].url

seems like slots cannot access variables that are defined in level above (like body and system)
M
B
v
3 comments
Seems not possible right now.

Maybe @TrySound has a workaround?

P.S.: yes, it would be great to have access to this kind of variables in Slot.
Not yet. Will be possible with custom components in the future.
great, thank you for the info
Add a reply
Sign up and join the conversation on Discord