SimonBiggs / scriptedforms

Quickly create live-update GUIs for Python packages using Markdown and simple HTML elements.
Apache License 2.0
508 stars 34 forks source link

Create a <content-container> which takes a conditional tag #219

Open SimonBiggs opened 6 years ago

SimonBiggs commented 6 years ago

Create a <content-container> which can have a conditional tag which causes the contents of that element to only be displayed if the conditional is met.

SimonBiggs commented 6 years ago

I imagine other features might be to pass variables through to display contents or something of that sort, or even have the contents occur multiple times based off of a for loop through the variables passed to the element.

SimonBiggs commented 6 years ago

Variable passing might work by having a parameter variables which takes a dictionary. The keys of the dictionary can then be used within curly brackets like so:

{{dictionary_key}}

A for loop could work similarly, except pass a list of dictionaries. The contents of the container is repeated for every dictionary in the list. Variables update to be the content of the new dict. ...

SimonBiggs commented 6 years ago

@robmarkcole what did you think about this?