Hi ... I’m a hack ... (let’s get that out of the way shall we!)
Has anyone updated the value of a Template Variable dynamically?
Example ... click submit button ... call a snippet ... snippet updates the Template Variable ... page reloads ... whole new ball game.
Am I drunk ... Yes. Do I need help ... Yes!
Thank you in advance if anyone has any ideas.
-
MODX Staff
- 730 Posts
I hacked around quite a few months back in order to create a form where you could edit a document’s template variables in the front end.
It was basically a reworking of the NewsEditor snippet, plus I nicked a bunch of code from the manager side to get the tv field rendering to come out properly.
I only implemented it on one site, so it’s not all nice and neatly packaged up. And with 0.9.7 on the horizon, I’m not sure that my approach to the problem is worth pursuing as a general solution.
Still, if anyone’s interested I could sketch it out in a bit more detail.