jDownloads Support Forum

jDownloads for Joomla 3.x => jDownloads 3.9 (Support ended) => Topic started by: TLWebdesign on 07.08.2020 17:48:58

Title: th tags not render properly in layout
Post by: TLWebdesign on 07.08.2020 17:48:58
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.
Title: Re: th tags not render properly in layout
Post by: ColinM on 09.08.2020 11:20:44
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
Title: Re: th tags not render properly in layout
Post by: TLWebdesign on 10.08.2020 12:07:50
Here it is.

I changed the extension to .txt so i could upload it here. I'm on JD 3.9.0.6
Title: Re: th tags not render properly in layout
Post by: ColinM on 10.08.2020 16:50:10
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
Title: Re: th tags not render properly in layout (sorted)
Post by: TLWebdesign on 14.08.2020 10:05:40
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
Title: Re: th tags not render properly in layout
Post by: ColinM on 15.08.2020 00:44:47
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