Results 1 to 2 of 2

Thread: gal_default.tpl minor issue with "show preview" deaktivated

  1. #1
    New user
    Join Date
    01-06-11.
    Location
    Germany
    Posts
    1

    Default 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
    Code:
    </tbody>
    </table>
    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

  2. #2
    Experienced user
    Join Date
    06-11-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default 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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •