![]() |
THandlers and Menu - Printable Version +- Atozed Forums (https://www.atozed.com/forums) +-- Forum: Atozed Software Products (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: THandlers and Menu (/thread-2470.html) |
THandlers and Menu - matija - 07-30-2021 Used HTML template. My form add to ServerController with: THandlers.Add('', 'MainForm', TContentForm.Create(TMyMainForm)); THandlers.Add('', 'Form1', TContentForm.Create(TMyForm1)); THandlers.Add('', 'Form2', TContentForm.Create(TMyForm2)); Link with: http://localhost/form1 http://localhost/form2 Delphi generation my links (<a href="">Linki1</a>) to mastertemplate.html in {%MyMenu%}. MyMenu.Caption: <ul> <li><a href="form1">Form 1</a></li> <li><a href="form2">Form 2</a></li> </ul> How do i get my link from THandels to href? <li><a href="' + IWServerController.THandels[1] + '">Form 1</a></li> !!!! RE: THandlers and Menu - kudzu - 07-30-2021 <li><a href="/form1">Form 1</a></li> <li><a href="/form2">Form 2</a></li> RE: THandlers and Menu - matija - 08-02-2021 (07-30-2021, 06:21 PM)kudzu Wrote: <li><a href="/form1">Form 1</a></li> This in correct. I woudle like this name/link (form1, form2) somehow from THandels? RE: THandlers and Menu - Alexandre Machado - 08-03-2021 The handler does not hold this information, because 1 handler can be connected to multiple paths. Besides that, multiple handlers can match a specific request (and there is an order to resolve the precedence). So, bottom line is that your application must "know" this information somehow |