i want to produce plain text with rapido, but html tags keep appearing even without a theme
My idea is to produce javascript / json with Rapido
Thank you !
i want to produce plain text with rapido, but html tags keep appearing even without a theme
My idea is to produce javascript / json with Rapido
Thank you !
It is not possible. But anyway that's not a good approach (templates are done to render HTML, not js).
If you need to produce JSON, you can call a method from a block, all the data it sends back are serialized in JSON, so:
def get_some_json(context):
return {"msg": "Hello"}
will work.
If you need your JS to behave "dynamically", just write a static JS, and pass all the dynamic information you need in the DOM using attributes like:
<div my-data="this is my data">Hello</div>
or via AJAX call to an endpoint sending JSON as explain.
I'll explore those options
Thank you Mr. Brehault!