Using Template Variables

<< Click to Display Table of Contents >>

Navigation:  Forum >

Using Template Variables

Forum link

 

 

 


 

05-14-2024, 02:42 PM:

 

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.