• Resolved sophiev

    (@sophiev)


    Thank you for the plugin which looks really useful.
    I’ve just downloaded it and can’t find a way to make a list the all the pdf (and only them).
    I’ve seen I can create a categoty and use it but as I already have more than 100 pdf, I would be delighted to find an other option !
    It might be obvious but know very little code.
    Thank you in advance for your answer,
    Sophie

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

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

    (@dglingren)

    Thanks for using the plugin and for your question. There are two different ways to “make a list”:

    1) If you are using the MLA admin screen and want to see the PDF files, you can click the “Application” view just below the screen title. That will display all of the files with the “application” MIME Type, including the PDFs. You can click on “Screen Options” in the upper-right corner of the screen to check the box next to “MIME Type”, making this column visible. You can then click on the MIME Type column header to sort the display by type, so all the PDFs are in one place.

    2) If you want to make a post or page with a list of the PDFs, you can use the [mla_gallery] shortcode. You can insert this shortcode in the body of your post/page to add a gallery of PDFs:

    [mla_gallery post_mime_type=application/pdf post_parent=all size=icon link=file]

    The parameters in the above example select just the PDFs (post_mime_type=application/pdf), show all of the PDFs regardless of what post/page they are attached to (post_parent=all), display an appropriate icon (size=icon) since PDFs are not images and makes each icon a link (link=file) to the corresponding PDF file.

    The PDFs will be listed in the gallery even if they are unattached, and the Caption field will be displayed under the icon for each file.

    I hope that answers your question. Please let me know if you need more information or have any problems getting what you want. Thanks for using the plugin!

    I love the plugin! So much more capability than the Media Categories plugin I was using.
    I want to display a list of PDF documents, each on their own line. Can I add a linefeed between list items?
    I am using the folowing query: [mla_gallery attachment_category=’q-view’ post_mime_type=all link=file]
    on this page:

    Plugin Author David Lingren

    (@dglingren)

    Thanks for this comment and for the kind words. I didn’t see a link to your page, but here are a couple of suggestions to get you started. You can use the [mla_gallery] shortcode to get what you want. For example:

    [mla_gallery columns=1 post_mime_type=application/pdf post_parent=all size=thubmnail link=file mla_caption="{+description+}"]

    The parameters in the above example select just the PDFs (post_mime_type=application/pdf), show all of the PDFs regardless of what post/page they are attached to (post_parent=all), display the attachment’s title (size=thumbnail) since PDFs are not images and makes each title a link (link=file) to the corresponding PDF file. The columns=1 parameter displays each attachment on a separate line.

    The PDFs will be listed in the gallery even if they are unattached, and the mla_caption="{+description+}" parameter means the attachment’s Description field will be displayed under the title for each file.

    You can find more documentation for the shortcode and an example of using custom templates for more advanced formatting in the Documentation tab of the MLA Settings acreen, or in the “Other Notes” section here in the MLA Plugins entry.

    I hope that answers your question. Please let me know if you need more information or have any problems getting what you want. Thanks for using the plugin!

    David –
    Thanks for the response. I don’t know why the link disappeared from my previous post. Here it is again:

    (
    https://www.communicationsdiversified.com/support/q-view-support/)

    The columns=1 parameter worked.
    So, my shortcode now looks like this:
    [mla_gallery attachment_category=’q-view’ post_mime_type=all link=file columns=1]

    However, I want to left-justify the list. (It seems to be centered by default.) I added some CSS before the shortcode, but that did nothing.
    I tried adding ‘align=left’ as a parameter. Ditto. I searched for ‘align’ on the ‘Other Notes’ page, but no joy. Can you advise? Thanks.

    Got it! I created a style template called ‘leftalign’ (just modified the default template). Then applied it using mla_style=leftalign
    LOVE IT!!

    Just to close this out:
    I got a little fancier and displayed my pdf list as an unordered list. You can see an example here:
    https://www.communicationsdiversified.com/support/q-view-support/

    I used a Markup Template I called ‘ul’.
    The template looks like this:

    Open:
    <div id='[+selector+]’ class=’gallery galleryid-[+id+] gallery-columns-[+columns+] gallery-size-[+size_class+]’ style=”float: left;”>

      Row Open:
      (nothing)

      Item:

    • [+link+]
    • Row Close:
      (nothing)

      Close:

    <br style=”clear: both” />
    </div>

    So, my shortcode looks like this:
    [mla_gallery attachment_category=’q-view’ post_mime_type=application/pdf link=file columns=1 mla_markup=ul]

    Sweet! Hope this helps somebody else!

    Plugin Author David Lingren

    (@dglingren)

    Thanks for the updates anf for sharing your results – the site looks great.

    I’m planning to enhance the [mla_gallery] styling and templates in a coming release so these ideas come at a good time.

    Plugin Author David Lingren

    (@dglingren)

    I did a bit of CSS reading and some further testing. The “centering” you observed in the default gallery style is a result of the way mla_itemwidth is calculated. The “Gallery Display Style” section in the documentation says:

    mla_itemwidth: specifies the width attribute (in percent) of the “.gallery-item” style. The default value is calculated by subtracting twice the margin from 100%, then dividing by the number of gallery columns. For example, the default value is “32”, or (100 – (2 * 1.5)) / 3.

    So, for columns=1 the item width becomes 97%, and the item content is centered within that; thus, it looks centered on the page.

    If you set mla_itemwidth=25 or some similar small value the gallery will move toward the left-hand side of the page. The best value to use will depend on the width of your captions or other item content.

    Adjusting the width of the item works pretty well and is a bit simpler than defining a custom template.

    I’ve also added an “mla_float” parameter to the next release so you can float the gallery to the right-hand side of the page.

    Thanks again for your interest and for using the plugin!

    That ordered list you made was spot on to what I might need to do and love the flexibility of the template and how you could make multiple. I am new to WP coming over from Concrete5. Where do I put that Markup Template in the structure of the site? So are you saying that I could make markup for a bunch of different outputs and just call them in the shortcode?
    Thanks so much for any help you can give!

    Plugin Author David Lingren

    (@dglingren)

    Thanks for the kind words and for your question. I hope I understand the question well enough to answer.

    You can create custom style and HTML markup templates in the “MLA Gallery” tab on the Settings page. The default templates are there so you can see them and copy them to give you a start.

    To use a template, you add the mla_style and/or mla_markup parameters to the [mla_galery] shortcode, e.g., [mla_gallery mla_markup=my-template].

    You can find more information on the Documentation tab of the Settings page. Let me know if this helps or if you have more questions.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘pdf list’ is closed to new replies.