Streaming live at 10am (PST)

Struggling with variables


#1

I work at an agency where we are using Webflow as a prototyping tool (we're attempting to at least :wink: ) and it's gone pretty well so far. One main issue we have is how to include variables into our prototypes. Considering that, two questions:

  • Is there a way to include variables into our prototypes and carry them between pages?
  • If not, is there a way to use a POST and GET variable through the URL?

I would add that we are willing to get creative with how this happens. It doesn't need to be production quality, just needs to get the job done.

Thanks!


#2

The best thing you can find inside of Webflow to push the envelope, apart from the CMS, is Custom Attributes. Select any element and go check the Settings tab. You can add arbitrary custom attributes.

So for an element, say a div, if you add a "MyAttribute" attribute with "New" as a value (it makes no sense, just for the example), you get that code in the end:

<div ID="myId" class="myClass" MyAttribute="New"></div>

Which is great because now you only have to plug an API to it. Make a coder write a JS API and call it in the header. You'll be able to export your code and run it on your server and the API will get all your attributes and populate content automatically, without touching your HTML/CSS code so you guaranty a continuous compatibility with your Webflow code. The API can also replace any filed you'll decide to put in your titles etc, such as {title} etc...


#3

Session storage might help for prototyping

https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage


#4

This topic was automatically closed after 60 days. New replies are no longer allowed.