• Resolved downtonpc

    (@downtonpc)


    Hi I wish to adjust the row height as there’s a little too much padding for each row. As an example see here https://downtonparishcouncil.gov.uk/main-council/agendas-and-minutes

    I have inspected the page using Chrome [a useful tool] and it seems that the padding is set in style.css at 0.8em for a td. As it’s style.css I assume it is picking up the site’s theme style?

    My question is how can I adjust the just the style for the mla tables?

    For info here’s the relevant calling code on the page:

    [mla_gallery mla_markup=downtonpc my_gallery_title=”2017 Documents” post_parent=all post_mime_type=application/pdf category_name=pub-doc tag=”main+2017″ size=icon mla_image_attributes=’width=”16″ height=”16″‘ columns=1 link=title orderby=”name?DESC”] ** By the way how much of this can be moved into the MLA gallery templates? **

    and as its style related the custom markup from MLA Gallery:

    <style type=’text/css’>
    #[+selector+] {
    margin: 0;
    width: auto;
    }
    #[+selector+] .gallery-row td .gallery-icon {
    width: 16;
    height: 16;
    vertical-align: top;
    }
    #[+selector+] .gallery-row .gallery-icon img {
    border: 0px solid #FF0000;
    }
    #[+selector+] .gallery-row {
    float: none;
    text-align: left;
    width: auto;
    padding: 0; << NB just added this back it had no effect
    }
    #[+selector+] .header-row {
    float: none;
    text-align: left;
    width: auto;
    font-weight: bold;
    }
    #[+selector+] .gallery-caption {
    margin-left: 0;
    vertical-align: top;
    }
    </style>

    and the details from the downtonpc Markup template:
    OPEN – <h3>[+template:([+query:my_gallery_title+]|Default Gallery Title)+]</h3>
    <table id=”[+selector+]” class=”gallery galleryid-[+id+] gallery-columns-[+columns+] gallery-size-[+size_class+]”>
    ROW OPEN – <tr class=”gallery-row”>
    ITEM – <td>
    [+pdf:Title+]
    </td>
    <td class=”gallery-icon”>
    [+link+]
    </td>

    https://www.ads-software.com/plugins/media-library-assistant/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for taking the time to post the source text of your shortcode and templates, and for the link to an example page.

    My CSS skills are somewhat limited but I can give you some suggestions to try. You’re right, the .8em padding is coming from your theme’s style.css file. Assuming you don’t want to modify that (a good practice) you can add styles to the MLA Style Template that will override the theme’s defaults.

    First, I do not see that you have added an mla_style= parameter to the shortcode to replace the default MLA template with your own custom template. You need to add something like mla_style=downtonpc or whatever you’ve named your custom style template.

    Once that’s done you can add some styles to your template to control the cell size. You wrote “just added this back it had no effect” – that style is applied to the <tr> tag, not the <td> tags and so will have no effect.

    Try adding something like this to your style template:

    #[+selector+] td {
        padding: .5em;
    }

    The #[+selector+] part of the style will give it priority over the theme’s style.

    You asked “much of this can be moved into the MLA gallery templates?” I recently added a new feature to the MLA Development Version. An “Arguments” section has been added to the markup template, and you can put default values for any of the shortcode parameters there. For your application, the shortcode could be:

    [mla_gallery mla_markup=downtonpc my_gallery_title="2017 Documents" category_name=pub-doc tag="main+2017"]

    and the Arguments section of the template could be:

    mla_style=downtonpc
    post_parent=all
    post_mime_type=application/pdf
    size=icon
    mla_image_attributes='width="16" height="16"'
    columns=1
    link=title
    orderby="name DESC"

    The category_name=pub-doc parameter could be moved as well, if all galleries using the template have the same value. I am not sure why you coded link=title; it looks like you meant link=file.

    It would be great if you can install the Development Version and let me know how the new Arguments section works for your application. Of course, if there are any other problems I’d like to know about them as well.

    Thread Starter downtonpc

    (@downtonpc)

    David,

    Hi thanks for the quick response.

    Re the style issue I don’t use the mla_style= parameter in the shortcode as I’ve picked my custom style template in the MLA settings page > Default [mla_gallery] Templates and Settings.

    I added your CSS and it worked fine.

    Re using the development version I will have a look once I have fixed the PDF title as a link issue which is in the other thread.

    Paul

    Thread Starter downtonpc

    (@downtonpc)

    I have tried out the development version adding this to its arguments section:
    post_parent=all
    post_mime_type=application/pdf
    size=icon
    mla_image_attributes=’width=”16″ height=”16″ ‘
    columns=1
    link=file
    orderby=”name?DESC”
    one setting per line worked fine.

    The shortcode in the actual page is now:

    [mla_gallery mla_markup=downtonpc my_gallery_title=”2017 Documents” category_name=pub-doc tag=”amen+2017″]

    I’ll add them to the other pages later.

    Many thanks again for an excellent plug-in.

    Paul

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your updates with the good news. The new Arguments section will make maintaining sites with many similar [mla_gallery] shortcodes much easier. I appreciate your testing it out.

    I will mark this topic resolved when the new Arguments section goes out in the next MLA version. Thanks for your kind words and for giving this new feature a try.

    Thread Starter downtonpc

    (@downtonpc)

    David, Just done some more testing and the precedence is such that one can overwrite whatever is in the ‘arguments’ by using different settings in the actual shortcode on a specific page. Which is a good feature.

    Paul

    Plugin Author David Lingren

    (@dglingren)

    Yes, that’s the intention. Thanks for confirming that it’s working and it’s the right choice.

    Plugin Author David Lingren

    (@dglingren)

    I have released MLA version 2.25, which includes the new Arguments section for the custom markup templates.

    I am marking this topic resolved, but please update it if you have any problems or further questions regarding the new version. Thanks again for working with me on the new feature.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Adjust Table Row Height’ is closed to new replies.