gal_default.tpl minor issue with "show preview" deaktivated
Hello,
i'm not using the "show preview" feature in the gallery list (using gal_default.tpl). If preview is deactivated the gallery module still parsing the html <table> and <tbody> tags (empty tags).
Frontpage output is:
Code:
<table cellspacing="0" cellpadding="0" summary="Image gallery">
<tbody>
</tbody>
</table>
I fixed it temporary by customizing the gal_default.tpl from
Code:
<table cellspacing="0" cellpadding="0" summary="Image gallery">
<tbody>
to
Code:
<?php if ($this->body): ?>
<table cellspacing="0" cellpadding="0" summary="Image gallery">
<tbody>
<?php endif; ?>
and the closing tags a few lines below from
to
Code:
<?php if ($this->body): ?>
</tbody>
</table>
<?php endif; ?>
It works and no unnecessary empty <table> and <tbody> tags are parsed anymore if "show preview" is deactivated. I'm not sure this is the best way to fix it. In my opinion it's ugly to parse unused html tags. Depending on your CSS definitions it waste space for example if there is a margin definition for tables. Not sure you want to fix it in the next release in some way. I just want to report this ;)
Re: gal_default.tpl minor issue with "show preview" deaktiva
This is not a minor issue on my side, but a minor issue on your side. You were supposed to use the gal_short.tpl, which doesn't render a body table at all. The previews are only intended t be used with gal_default.tpl. Of course, you're always welcome to make your own custom table.