Support » Plugin: Media Library Assistant » Need to Categorize and render PDF list

  • Resolved nickchia


    I downloaded the Media Library Assistant plugin to organize a PDF library? Basically, my client has about 80 product publications that they need to make available to their customers. It has to be easy for them to use. I want to set up a page that will list all the products by category. This plugin will have to a allow the user to:
    -create categories for the PDFs
    -upload PDFs
    -assign them each a name
    -permit them to put them in specific order
    -automatically render the list with categories on their “Literature” page.

    This plugin is so involved, and not being great at php, seems really difficult. Is there an easy way for me to figure this out?

    The included link is that page on their current site (not WordPress).The new site will be a WP site and needs to offer this functionality.


    The page I need help with: [log in to see the link]

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


    Thanks for your detailed question and for the link to you client’s web page; very helpful.

    MLA can provide assistance with this application. You should be able to do the job without actually resorting to PHP coding. Here are my initial thoughts:

    -create categories for the PDFs MLA adds taxonomy support for Media Library items. You can use MLA’s “Att. Categories” and/or “Att. Tags” taxonomies to assign terms to the documents. For example, you can assign a term for each of the headings on the web page, e.g., “SigmaFire Steam Generator Specifications” or something shorter like “SigmaFire”. Terms can be assigned during the upload process using MLA’s “Bulk Edit area” on the WordPress Media/Add New (Upload New Media) admin screen. They can be added or modified later using the Media/Assistant Bulk Edit or Quick Edit areas, or on the WordPress Media/Edit Media acreen.

    -upload PDFs As noted above, users can upload new documents with the WordPress Media/Add New (Upload New Media) admin screen. MLA does not have or require a process of its own, but it does add the “Bulk Edit area” to the WordPress admin screen.

    -assign them each a name WordPress will derive a Title for each item from the file name. Your client’s file names are not very helpful for this purpose. Once the documents are uploaded you can use the Media/Assistant Quick Edit area or the WordPress Media/Edit screen to update the Title value.

    -permit them to put them in specific order You can use the WordPress-standard “Menu Order” field to arrange the documents in a specific order. You could also sort on the document Title, but this would put “Model E154” after “Model 1004”, which would look odd. You could define a custom field and assign values like “E0154” and “E1004” to fix the sorting problem in a more logical way than using the Menu Order.

    -automatically render the list with categories on their “Literature” page. You can use the [mla_gallery] shortcode for this purpose. There are several ways to implement the page; the simplest would be to have a separate shortcode for each of the headings on the page. For example:

    <h2>SigmaFire Steam Generator Specifications</h2>
    [mla_gallery attachment_category=sigmafire post_mime_type=application/pdf orderby=menu_order]
    <h2>E-Series Standard and FMB Burner Steam Generator Specifications</h2>

    You can also use the IPTC metadata support for PDF documents to pre-populate values like the Title and categories and then use MLA’s mapping rules to extract the metadata and use it to update your items. I had a look at one of your client’s documents and aside from “Author” the fields are empty. Adding the metadata you want would be a separate step.

    As you’ve observed, MLA is powerful but can be complex. I know the Settings/Media Library Assistant Documentation tab is more reference than tutorial. I do my nest to answer questions here in the support forum and fill in the blanks. You may be interested in these earlier topics along similar lines:

    Just start with it

    Generate a table with pdf-files

    Problems with PDFs

    I hope that gets you started on a solution for your client. I am marking this topic resolved, but please update it or start another topic if you have problems or further questions regarding the above suggestions. I am happy to give you whatever help I can in using MLA; thanks for your interest in the plugin.



    Hi categorising PDFs is where I started out with Media Library Assistant. In my case I used the document properties available in the original authoring package (MS Word) to define the categories and then used MLA’s rules to populate the meta data in WordPress. These were then formatted using the style and markup settings in MLA and displayed on Pages using the shortcode.

    Here’s some example outputs

    I also created a debug page that lists the key details titles in my case then the details held in the PDFs.

    Thread Starter nickchia


    Thank you for these responses. I will follow these instructions.

    Thread Starter nickchia


    Hi David,

    Your instructions worked perfectly. The only issue I am having is that I cannot get the media Title to render under the thumbnail. Ideally, I would like to only generate an unordered list with links to each PDF. But I can also do a gallery view as long as the PDF Titles render. Here is the page:

    Thanx a ton,

    • This reply was modified 4 years ago by nickchia.
    Plugin Author David Lingren


    @cuckoofairweb – Thanks for adding your comments to this topic and the links to your site. I really like the debug page you created.


    Thanks for the good news regarding my suggestions and the link to your gallery page, which looks good.

    The easiest way to add a caption to your thumbnail images is to add the mla_caption parameter to your shortcodes. For example:

    [mla_gallery mla_caption="{+title+}" attachment_category=sigmafire post_mime_type=application/pdf orderby=menu_order]

    You can find more information in the “Attachment-specific substitution parameters for the markup template Item part” section of the Settings/Media Library Assistant Documentation tab.

    Of course, you could also define a custom markup template to gain more control over the gallery composition, but that’s more work.

    Thread Starter nickchia



    Thanx soooo much! You’re awesome!!!

    I want to do a very similar thing to provide a categorized list of PDFs and potentially other media types on a Resources page. I am wondering how dependent my site will be on the MLA plugin if I try this. I am sure the Resources page will not work when the plugin is deactivated or removed, but what about other places where the site links to PDFs and other media objects? Will those continue to work if MLA is deactivated or removed? After MLA is deactivated or removed, will we still be able to see all of the files we added with MLA using the standard Media Library? Is the extra material added to the database to support MLA easily removed if we decide to go a different direction some time in the future?

    Thank you! This looks cool!

    Plugin Author David Lingren



    Thanks for your questions. As you’ve mentioned, using and then removing MLA would make any posts/pages that use MLA shortcodes such as [mla_gallery] less functional. Other MLA features such as the Media/Assistant admin submenu, taxonomy support, IPTC/EXIF metadata extraction and enhanced MIME Type support would be removed as well.

    You could continue to use the Att. Categories and Att. Tags taxonomies if you copied the MLA registration code from class-mla-objects.php to your theme or another plugin, but there would be limited UI support for them.

    As the name implies, MLA uses the WordPress Media Library (and other WordPress features and functions) as much as possible. all of you files are uploaded and stored by WordPress and would be unaffected by removing MLA. You can verify this by deactivating the plugin and using the Media/Library admin submenu, etc.

    The “extra material added to the database” is limited to taxonomy terms, custom fields you define and option settings. You can remove the taxonomy terms by accessing the Media/Att. Categories and Media/Att. Tags admin screens and deleting the terms you’ve assigned to items. Custom fields will continue to work, but you can remove them by navigating to the Settings/Media Library Assistant Custom Fields tab and using the “Purge Values” and “Delete Permanently” actions in the Bulk Actions dropdown or individual rule rollover actions. You can delete MLA option settings by navigating to the Settings/Media Library Assistant General tab, scrolling down to the “Uninstall (Delete) Plugin Settings” section and checking the “Delete Option Settings” box before deactivating and deleting the plugin.

    I hope that answers your questions. If you have problems or further questions regarding MLA for your application, start a new support topic and I will give you any help I can. Thanks for your interest in the plugin.

    That’s an amazingly informative and quick response! Thank you!

    Hi David, Similar to others in this thread:

    A) I am really impressed with this plugin and the level of support you seem to be providing, and…
    B) Really overwhelmed by the depth of functionality, so…

    I want to take a shot at a simple path to
    CATEGORIZING > FILTERING > DISPLAYING a few media files (PDF, JOG, DOC) for my kids’ (Montessori) school’s LMS.

    Basically, we have 3 “Categories” of content:
    1. Classroom – “E1”, “E2”, “E2”
    2. Levels within each Classroom – “Jr” or “Sr”
    3. Lesson Topics – ie “Art”, “Math”, “Botany” etc.. << Most important!

    Ideally, we create a Checkbox or Dropdown filter that display attachments based on users’ selections. Here is my attempt at that, which ended up not working (It only lists quantity of attachments, does not actually display attachments or ability to open them):
    [mla_term_list taxonomy=attachment_category mla_output=”dropdown” show_count=true mla_target=”_blank”]

    I have re-purposed the code you shared above, which displays thumbs and links to files, but does not have any list or filtering capabilities..
    [mla_gallery attachment_category=botany post_mime_type=application/pdf orderby=menu_order]

    Here is a screenshot of the two current attempts:

    How would you recommend I proceed to offer users the ability to filter by Category, then open files based on their selections?


    Plugin Author David Lingren


    @chriscutler – Thanks for the kind words, for your question and for including the source text of your shortcodes. You have found the two elements of a solution; you just have to combine them to get a complete result.

    As you’ve seen, the [mla_term_list] shortcode displays taxonomy terms in a variety of formats and lets the user select one or more of them. The [mla_gallery] shortcode can filter the Media Library by one or more terms and display a gallery of results. The simple place to start is with the “MLA Term List Examples” section of the Settings/Media Library Assistant Documentation tab. The example there shows a form containing the term list and a “Search” button. When the button is clicked, the “Gallery” section has two [mla_gellery] shortcodes; one for pagination controls and one for the gallery display. See if you can adapt that example for your application.

    This is a very common application for MLA users. Here are some earlier topics along similar lines you might find helpful:

    Drop down not sticking

    Search solution

    keep selected dropdown value after submit (cookie, local storage ???)

    Please post an update or, better yet, start a new topic if you have any problems or further questions regarding the above suggestions and earlier topics. I am happy to give you further guidance if you need it. Thanks for your interest in the plugin.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Need to Categorize and render PDF list’ is closed to new replies.