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

    (@dglingren)

    Thanks for your question. As I recall, you are composing an [mla_gallery] for PDF documents; is that right?

    There is an earlier topic along similar lines:

    link to the pdf on the title and the icon

    However, things have improved since that topic and I can give you an easier solution to your needs. If you enclose your [mla_gallery] in <code></code> tags you can use the mla_caption parameter to get what you want. Try something like this:

    <code>[mla_gallery post_parent=all post_mime_type="application/pdf" link=file size=icon mla_caption='<a href="{+file_url+}" target="_blank">{+title+}</a>' mla_target="_blank"]</code>

    If you want to use the mla_viewer=true to show document thumbnails the solution is somewhat different:

    <code>[mla_gallery post_parent=all post_mime_type="application/pdf" link=file mla_viewer=true mla_image_alt='{+title+}' mla_caption='<a href="{+file_url+}" target="_blank">{+title+}</a>' mla_target="_blank"]</code>

    You must add the mla_image_alt parameter to override the default, which is the caption, since your mla_caption contains HTML markup that isn’t allowed in the HTML alt attribute.

    I hope the above alternatives get you the results you want. I am marking this topic resolved, but please update it if you have problems or further questions regarding a “clickable caption” for your [mla_gallery] display.

    Thread Starter medium-americano

    (@medium-americano)

    Thanks for your swift reply.

    I tried your suggestions and I’m afraid it wouldn’t work. Adding the code tags served only to change the font of my titles.

    This is the shortcode code I’m working with at the moment:

    [mla_gallery post_mime_type=application/pdf size="icon" attachment_category=policy-and-publications link=file columns=1 orderby=date order=desc mla_rollover_text='{+title+}' numberposts="2" mla_caption='<a href="{+file_url+}" target="_blank">{+title+}</a>' mla_target="_blank"]
    
    [mla_gallery post_mime_type=application/pdf size="icon" attachment_category=policy-and-publications link=file columns=1 orderby=date order=desc mla_rollover_text='{+title+}' numberposts="2" mla_caption='<a href="{+file_url+}" target="_blank">{+title+}</a>' mla_target="_blank" mla_output="paginate_links,prev_next"]

    I tried this with the addition of your opening and closing code tags, I also tried stripping my shortcode all away and trying your suggested shortcode all on its own but that wouldn’t work either.

    If it helps, the page is here front end password = fluoride

    Plugin Author David Lingren

    (@dglingren)

    Thank you for the update and especially for the link to your example page; very helpful. I regret that you are still having trouble with this issue.

    I had a look at the example page and the HTML markup of the gallery items is not what I would expect from the default mla_markup template. Are you using a custom Markup template? I do not see a parameter for this in your shortcodes, but perhaps you changed the default in the “Default [mla_gallery] Templates and Settings” section of the Settings/Media Library Assistant MLA Gallery tab.

    In particular, the default caption markup has been replaced by a <span> inside an <h4>. If the span content is anything other than [+caption+] you won’t get the modified value set by the mla_caption parameter.

    With a custom template you can omit the mla_caption parameter and put your changes directly in the template. If you’re already using a custom template this is the better approach.

    Let me know if I’m on the right track or if I’ve missed something in your application setup.

    Thread Starter medium-americano

    (@medium-americano)

    Thanks David. You’ve cracked it. A developer had initially configured the setup and had done so with a custom template which I was able to alter to include the code that I previously had within the mla_caption parameter.

    This is a great plugin!

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your update with the good news. I am happy to hear my suggestion helped you get the results you wanted.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Attachment title as link’ is closed to new replies.