<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Thanks I have forgotten the listings example.<br><br>Leonardo M. Ramé<br>
http://leonardorame.blogspot.com<br><br>--- On <b>Mon, 6/7/10, ABorka <i><fpc-devel@aborka.com></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: ABorka <fpc-devel@aborka.com><br>Subject: Re: [fpc-devel] fpWeb recursive tag replace<br>To: "FPC developers' list" <fpc-devel@lists.freepascal.org><br>Date: Monday, June 7, 2010, 9:02 PM<br><br><div class="plainMail">On 6/7/2010 16:40, Leonardo M. Ramé wrote:<br>> Hi, when I use html templates with tags that contains inner tags, the<br>> ReplaceTag event is fired only once, for the 1st order tag, but not for<br>> the inner tags.<br>><br>> Example, a home page containing a header (a tag) and a body which<br>> contains another tag like, for example {+search_form+}. The search_form<br>> tag, also contains some {+tags+} to be replaced by the main program.<br>><br>> Is there an "official" way to
 handle this use case?<br>><br>> Leonardo M. Ramé<br>> <a href="http://leonardorame.blogspot.com" target="_blank">http://leonardorame.blogspot.com</a><br><br>An example template attached would have helped, but guessing your problem...<br><br>If you use the "AllowTagParams := true;" for a template, then you cannot <br>have recursive embedded tags. That is what the tag parameters can be <br>used for instead.<br>For example:<br>{+search_form<br>[-formheader=<form blah blah>-]<br><br>[-formbody=<input type...>-]<br><br>[-formfooter=</form>-]<br>+}<br><br>Your program needs to replace the "search_form" tag by also processing <br>the tag parameters.<br>To see some examples for template usage, try the demo programs under<br>...\lazarus\components\fpweb\demo\fptemplate\...<br><br>AB<br><br>_______________________________________________<br>fpc-devel maillist  -  <a ymailto="mailto:fpc-devel@lists.freepascal.org"
 href="/mc/compose?to=fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a><br><a href="http://lists.freepascal.org/mailman/listinfo/fpc-devel" target="_blank">http://lists.freepascal.org/mailman/listinfo/fpc-devel</a><br></div></blockquote></td></tr></table><br>