Frage

All,

Is there a way to stop HTML5Builder from wrapping components in div tags?

Each component that gets output has extra div tags wrapped around it like this:

<div id="label1_outer" style="display: inline;"><div id="label1"    >Label</div></div>

When I uncheck 'divwrap' on the component, the output for that component changes to:

<div id="label1_outer" style="display: inline;">Label</div>

so almost what I am looking for.

[Note that this is the resulting code after outputting a label component value using a Smarty template.]

I am trying to find a method to STOP these extra div tags showing since it is throwing off my CSS and it would be a real pain to recode my CSS to handle this.

I have posted the same questions here following a previous response from a user about editing the graphics.ini.php file:

https://forums.embarcadero.com/thread.jspa?threadID=80038&tstart=0

However, so far, no luck in getting a response.

Any information on how to stop HTML5Builder from forcing these tags to be output would be great, thanks!

War es hilfreich?

Lösung

In case anyone else needs the answer, I did get to the bottom of it.

In the RPCL folder in the H5B installation directory, there is a file called 'smartytemplate.inc.php'. This file is adding the extra div wrappers around every referenced component.

To stop it, search the file for '_outer' and you will fine 2 sections where the extra divs are created:

if ($v->inheritsFrom('Control'))
{
if ($v->DivWrap) $code="<div id=\"".$v->Name."_outer\" style=\"display:inline;$style\">".$code."</div>";
}
else $code="<div id=\"".$v->Name."_outer\" style=\"display:inline;$style\">".$code."</div>";

You can just comment out this section of code, and the annoying wrappers will go away.

Hope that this is helpful!

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top