Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TIWTemplateProcessorHTML Variables usage
#1

.zip   TemplateVariable.zip (Size: 7.95 KB / Downloads: 2)

In above sample project, I tried to use the IWTemplateProcessorHTML1.Variables in order to replace some variable in template to actual value, but I found out that only the first one is replaced. Is this intended or bug? 
I only found IWTemplateProcessorHTML1.Variables able to replace every occurrence in both master template and default template. But it is only able to replace one variable, (variable2, variable3, variable4 in above sample is ignored).

Is there any other way to achieve this? I need to replace some html attribute value like above sample, 
- OnUnknownTag event cannot do that due to the event only called when it is at same level as tag <h1>{%var%}</h1>, doesn't work if try to <h1 {%var%}></h1>.
- OnBeforeProcess event seems like doesn't work for template with master template.
Reply
#2
There is a bug, in the logic to replace variables. After a successful first replacement (rfReplaceAll), it stops working.
Alexandre is notified, so it should be fixed in the next release.
Reply
#3
(07-08-2025, 12:13 PM)jeroen.rottink Wrote: There is a bug, in the logic to replace variables. After a successful first replacement (rfReplaceAll), it stops working.
Alexandre is notified, so it should be fixed in the next release.

Alright, thanks~
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)