Well not 100% sure what you want to achieve, but judging from your question you want to execute some code inside of a Text block generated from WYSIWYG editor for example?
1) If above is correct, your best option is to use placeholders. It is easier for non programmer users to use and less fragile to break your app. It is easy to pass parameters in shortcodes:
'[flight-search-form blabla=123 test=44 bla2="haha"]'
You just have to replace str_replace
with more advanced function that can parse parameters.
2) If your page is built with "blocks" then you have to use some other logic. In this case i would do something like:
// Lets say your Blocks setup in the CMS looks like:
BLOCK-0 (header navigation)
BLOCK-1 (generic slideshow)
BLOCK-2 (news widget)
BLOCK-3 (products slideshow)
BLOCK-4 (footer navigation)
// Volt code may look something like:
{% for block in blocks %}
{{ block.render() }} // This is a random function name
{% endfor %}
In the example above the block
can be a Model object, which will contain all needed DB properties/parameters which can be used in the related block template.