Atozed Forums

Full Version: Using Template Variables
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Reading https://www.atozed.com/2024/05/whats-new...traweb-15/ is noticed Template Variables. They were added in IW15.5.4
There is no demo available but the source helps me out a bit.

Currently I use something similar I created using TIWTemplateProcessorHTML.OnAfterProgress etc. This works but I would like to migrate to this IW offered feature.
There is one part I can't solve yet. I use variables in HTML and javascript.


Code:
<div class="value">{%dbProject%}</div>

<script>
function updateProjectInfo() {
  var projectName = "{%dbProject_escaped%}";
  // ...
}

</script>


'_escaped' is a modifier that tells my template processor to escape the value that is returned according to the javascript rules.
Is it possible to use Template Variables and achieve the same effect.