• lukasvo

    (@lukasvo)


    This is a sample from frontend output code I came accross:

    <div class="download-attachments">
       <table class="table">
       <thead>
          <th class="attachment-title">File</th>
          <th class="attachment-about">Description</th>
       </thead>
       <body>
       <span class="pdf"><a href="(...)" title="(...)">(...)</a><br /></span>
       <span class="pdf"><a href="(...)" class="attachment-link" title="(...)">(...)</a><br /></span>
       <span class="pdf"><a href="(...)" class="attachment-link" title="(...)">(...)</a><br /></span>
    </div>

    I see two mistakes, correct me if I’m wrong.

    • The list display style is set on my settings page but the frontend code starts as a table. Also, there are no <td> tags nor a closing </tbody> and </table> tag
    • If this were a table style, <body> should be <tbody> instead

    https://www.ads-software.com/plugins/download-attachments/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author dFactory

    (@dfactory)

    That html putput is definitely broken. Question is why?

    We’ve double checked the code and output in our sites and it works as expected.

    Maybe there’s some broken HTML in file description that then corrupts the whole DA output?

    Regards,
    Bartosz / dfactory team

    Thread Starter lukasvo

    (@lukasvo)

    Hi Bartosz, thanks for your reply.

    The files in question didn’t have any description. I added them and the output now looks like this (still broken):

    <div class="download-attachments">
       <table class="table">
       <thead>
          <th class="attachment-title">File</th>
          <th class="attachment-about">Description</th>
       </thead>
       <tbody>
          <span class="pdf">
             <a href="(...)" class="attachment-link" title="(...)">(...)</a><br />
             <span class="attachment-caption">(...)</span><br />
          </span>
          <span class="pdf">
             <a href="(...)" class="attachment-link" title="(...)">(...)</a><br />
             <span class="attachment-caption">(...)</span><br />
          </span>
    </div>

    My shortcode looks like this btw:
    [download-attachments container="div" title="" style="none" display_icon="0" display_user="0"]

    Plugin Author dFactory

    (@dfactory)

    Hmm…

    You have the style set to none. What if you change that to “list” or “table”. Will you have the correct output?

    Thread Starter lukasvo

    (@lukasvo)

    Damn, I should have noticed that.

    Changing it to “list” did the trick. Thank you very much!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Mixed up table and list display style’ is closed to new replies.