Atozed Forums

Full Version: Template and Components at Runtime
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi

I'm using Delphi Seattle and Intraweb 14.0.47.

I am trying to achieve the following, in a template I put a tag like this {%varmenu%} in runtime I generate the HTML tags like this:

Example
<li>{%myFrame.button1%}</li>
<li>{%myFrame.button2%}</li>

Of course I use the event OnUnknownTag from the TIWTemplateProcessorHTML component to replace the tag {%varmenu%}.

When running the application I was expecting to see the components but instead what I see is the name of the tags like this:
{%myFrame.button1%}
{%myFrame.button2%}

What am I missing?

Can someone help me out?

TIA
Hi Rolphy.
When the OnUnknownTag occurs, the IW has gone through all the TAGs and it did not find this {%varmenu%}.
At this point you create NEW TAGS and IW DOESN'T know about them.
You must Generate the TAG {%varmenu%} already filled with all options, that is, all the HTML code.
(01-28-2020, 03:33 PM)Jose Nilton Pace Wrote: [ -> ]Hi Rolphy.
When the OnUnknownTag occurs, the IW has gone through all the TAGs and it did not find this {%varmenu%}.
At this point you create NEW TAGS and IW DOESN'T know about them.
You must Generate the TAG {%varmenu%} already filled with all options, that is, all the HTML code.

Hi Jose, thank you for your time.

I understand what you said and that is exactly what I don't know how to do.

Do you have an example?

I just know how to change the value of {%varmenu%} at the OnUnknownTag event, but I don't know how to tell  Intraweb that it needs to parse the new TAGS.

I'm very new at the HTML things.