forum.coppermine-gallery.net

Support => cpg1.6.x Support => cpg1.6 themes (visuals) => Topic started by: biellebrunner on August 22, 2020, 08:03:50 am

Title: Wrap template_cat_list in div
Post by: biellebrunner on August 22, 2020, 08:03:50 am
I'm trying to wrap the category list in a div, but I can't seem to make it work.

In the main page, it looks just fine, but when I go in a category with child categories, the category list there doesn't have the closing div, so the rest of the layout is all messed up.

This is my template_cat_list:

Code: [Select]
// HTML template for the category list
$template_cat_list = <<<EOT
<!-- BEGIN header -->
<div class="listagem">
        <div class="row">
                <div class="titlerow principal">{CATEGORY}</div>
                <div class="titlerow estreito">{ALBUMS}</div>
                <div class="titlerow estreito">{PICTURES}</div>
        </div>
<!-- END header -->
<!-- BEGIN catrow_noalb -->
        <div class="catrow full">{CAT_TITLE}{CAT_DESC}</div>
<!-- END catrow_noalb -->
<!-- BEGIN catrow -->
        <div class="row">
                <div class="catrow principal">{CAT_TITLE}</div>
                <div class="catrow estreito">{ALB_COUNT}</div>
                <div class="catrow estreito">{PIC_COUNT}</div>
        </div>
<!-- END catrow -->
<!-- BEGIN footer -->
        </div><div class="estatistica">{STATISTICS}</div>
<!-- END footer -->
<!-- BEGIN spacer -->
<!-- END spacer -->

EOT;

I've tried moving the div before statistics to outside the tags (it doesn't show up), to other tags (either doesn't show up or closes the catlist before all rows are displayed). I've tried using 'print' and 'echo' at the end, before EOT;, but all to no avail.

Can anyone help, please?
Title: Re: Wrap template_cat_list in div
Post by: ron4mac on August 22, 2020, 02:12:33 pm
Unless you've changed code elsewhere, you're trying to stuff a bunch of divs in a table without any table rows or columns. You might want to put a <tr><td> to begin the header and a </td></tr> at the end of the footer.

Code: [Select]
<!-- BEGIN header -->
<tr><td><div class="listagem">

Code: [Select]
<!-- BEGIN footer -->
<div class="estatistica">{STATISTICS}</div>
</div></td></tr>
Title: Re: Wrap template_cat_list in div
Post by: biellebrunner on August 22, 2020, 05:28:14 pm
I've made changes so I could get a totally responsive design with just the elements I want.
My starttable calls a div.