![]() |
|
TIWTemplateProcessorHTML Variables usage - Printable Version +- Atozed Forums (https://www.atozed.com/forums) +-- Forum: Atozed Software (https://www.atozed.com/forums/forum-1.html) +--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html) +---- Forum: English (https://www.atozed.com/forums/forum-16.html) +----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html) +----- Thread: TIWTemplateProcessorHTML Variables usage (/thread-5290.html) |
TIWTemplateProcessorHTML Variables usage - RenSword - 07-07-2025
TemplateVariable.zip (Size: 7.95 KB / Downloads: 3)
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. RE: TIWTemplateProcessorHTML Variables usage - jeroen.rottink - 07-08-2025 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. RE: TIWTemplateProcessorHTML Variables usage - RenSword - 07-08-2025 (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. Alright, thanks~ |