Wrap template_cat_list in div Wrap template_cat_list in div
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Wrap template_cat_list in div

Started by biellebrunner, August 22, 2020, 08:03:50 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

biellebrunner

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:


// 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?

ron4mac

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.

<!-- BEGIN header -->
<tr><td><div class="listagem">


<!-- BEGIN footer -->
<div class="estatistica">{STATISTICS}</div>
</div></td></tr>

biellebrunner

I've made changes so I could get a totally responsive design with just the elements I want.
My starttable calls a div.