Hi, guys

Let's say we have html/css as usual. And all the couch tags, editables, definitions etc inserted on server? Link a script, some serverside javascript-style script, that does manipulation on the fly. So, all tags stay in separate files and .php are pure html intact.

On the server side, before php kicks in, there is something similar to <cms:embed>, which inserts Couch tags inline to the predefined places. Then php kicks in and Couch executes its code and third step as usual - html generated and served to browser.

1) html:
<body>
<p class="welcome-msg">Hi, maddie</p>
</body>

2) script:
find 'p.welcome-msg' -> insert -> '<cms:show my_var />'

3) normal state of things:
<body>
<p class="welcome-msg"><cms:show my_var /></p>
</body>

What are the tools that allow such a nonsense? /kinda my educational inquiry/
Thank you!!