Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using Template Variables
#1
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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)