Join the Webstudio community

Updated 10 months ago

Parent Variables of a Slot Within A Slot

At a glance
Request: To allow variables that are parents of a slot to be accessible within a slot.

Is this technically feasible?

I'm messing with resources in prep for CMS and realizing how much my posts benefit from slots but I'll have to do without as of now
O
J
5 comments
content in slots can't have access to variables outside, because these may not exist depending on where slot is used cc @TrySound

can you describe the exact situation? maybe we have an idea how this can be solved differently
most likely you would want a nocode component where variables are passed as props from the place where the component is used
Can I accept the risk that the variable may not be present?

Use case: I have three different post types. They are all blog posts to an extent but different formats. They share the same header, byline, author box, ctas, but different body and URLs
If the "risk" was on the user (or handled gracefully), it would open up the ability for components (to an extent)
we had a long discussion with @TrySound it seems that we agree that we will need a global variables in addition to the instance variables and those global variables will be accessible across slot boundaries
Add a reply
Sign up and join the conversation on Discord