News:

Support for jDownloads 3 has been ended
Since 17 August 2023 Joomla.org has discontinued support for Joomla 3.x. Therefore, we will no longer offer official support for our Joomla 3 jDownloads version 3.9.x from January 2024.
Please update your website to the latest Joomla version (Joomla 4 or Joomla 5) as soon as possible. Afterwards, please update jDownloads to the latest published version. The longer you delay, the more difficult the upgrade process for your website is likely to be.

Main Menu
Support-Forum

th tags not render properly in layout

Started by TLWebdesign, 07.08.2020 17:48:58

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

TLWebdesign

I added custom layout with a table and vertical th like for example this:

<table class="table table-condensed table-striped">
            <tbody>
<tr>
               <td>{filesize_title}</td>
               <td>{filesize_text}</td>
            </tr>

generates this:

<table class="table table-condensed table-striped">
            <tbody><tr>
               <th></th>
               
            </tr>
            <tr>
               <td>Grootte</td>
               <td>6.26 MB</td>
            </tr>

it adds rows at both ends of the table with an empty th.
  •  

ColinM

Hi
Could you please export your layout and send it to me so I can look in more detailWhich version of jD are you using? 

Colin
Colin M
  •  

TLWebdesign

Here it is.

I changed the extension to .txt so i could upload it here. I'm on JD 3.9.0.6
  •  

ColinM

Hi
The 'challenge' was that the jD front end css hads a rule
.jd-item-page tr, .jd-item-page td {
    border: 0px !important;
}- the <th> was ok
So I modified your layout with added style for the <td> elements   See pic for result and copy of the modified layout
You could put the relevant CSS in jD custom.css to make it better  - you would also need a last child to do the line at the bottom
Colin
Colin M
  •  

TLWebdesign

Hmm no this was not the issue.  I figured what the issue is. And it is a problem of my own. Something i didn't take into consideration. the empty rows are the {license_title} row and {system_title} these appear to be empty and so they end up as empty rows with the second td stripped. 

Uhm how can i make those rows "responsive"? so they're not generated when there is no value? Kind of like RSForms handles this: {if {license_title}}<tr><td>{license_title}</td></tr>{/if}.

i couldn't find something similar in your documentation. or something that also has the same effect.

Kind regards,

Tom
  •  

ColinM

Tom
With jd3.9.1 in FrontEnd Options there are two settings, 'Remove label if field empty' and 'Remove empty HTML tags' that resolve the situation in the standard 'div' based layouts. but they are unlikely to work with table based items.
I will do some experiments this weekend
Colin
Colin M
  •