• Resolved loiruca

    (@loiruca)


    Hi, I’m very new to Pods and I was wondering how to add a link to the title.

    Basically I need something really simple. On my template all I have is date and an upload a pdf file. However, I want the title of the pdf to show and link to the actual pdf file. How do I go about that? Also sometimes I want to have an image to show and link to a pdf file.

    This is what I have so far:

    <p>{@post_date}</p>
    <p>{@post_title}</p>
    <img src=”{@upload_pdf_file._src.thumbnail}”

    Thanks in advance.

    https://www.ads-software.com/plugins/pods/

Viewing 1 replies (of 1 total)
  • Plugin Contributor Jim True

    (@jimtrue)

    Unfortunately the ‘title’ of the individual files is not available through the magic tags process. This has to do with this particular bug which we’re tracking here:

    https://github.com/pods-framework/pods/issues/3376

    What you can do is feed the {@upload_pdf_file} to another PHP function and use that to output the title. If you’re comfortable with PHP, that should pass an array of the values stored in the database at that level and you can use them to output your link the way you’d like.

    The other option is to make your upload_pdf_file instead of being a file field to be a relationship to a post type with it’s own post_title and post_date, since above in your template, that sounds like what you’re trying to do.

    If I’m totally off base on my suggestions, please feel free to join our Slack Chat at https://pods.io/chat/ in the #support channel and we can discuss what you’re trying to accomplish and I can help you come up with ideas that might work.

Viewing 1 replies (of 1 total)
  • The topic ‘Adding link to title of post’ is closed to new replies.