PDF Listing Snippet?

I need to display links to a bunch of PDFs in say, a button format i.e. each button displays a title for the PDF which when clicked, either opens or downloads the PDF. The trouble is the names of the PDFs are not the same as the titles and I’m wondering if there’s a way of substituting the PDF name for a titl that makes sense? Sorry if I’m not 100% clear - just trying to think how it could work.

If i understand this correctly, I’d use MIGX for that. You could set up two fields: One for the title (the text your button shows) and one for the file.

1 Like

You could create static resources for the PDFs. Then you’d have all the standard resource fields available for naming and you could create the list dynamically with pdoMenu or pdoResources.

2 Likes

Yes I think that is probably going to be the best way and also easiest for the client to manage

A static resource is a great solution!

I made a template for PDF static resources.
image

You can use it to add an image field for thumbnails. Also it allows you to schedule and update the PDF without changing the path.

Here is a chunk I like to use.

<div class="col-md-3 col-sm-6 col-xs-12">
	[[+photo:ne=``:then=`<img class="img-thumbnail" src="[[+photo:pthumb=`w=150&h=175`]]" alt="" />`:else=``]]
    <p class="h5">[[+longtitle:default=`[[+pagetitle]]`]]</p><small>(PDF [[+menutitle:fmt.fileSize=`mb`]])</small>
</div>
</a>

It uses an output filter to display the file size of the PDF

And a plug-in to make sure the client doesn’t make a mistake.

2 Likes

Thank you - that’s really helpful