We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

Different hero image on different tag page and post page

  • #3794
    Avatar photo[anonymous]

    I want a different banner image on different custom tag page and post page, but since there is no media library, is it possible to add external image to the template?

    If that possible maybe I could also add carousel banner.

    Avatar photo[anonymous]

    I noticed that there is a customHTML.beforePost in Mercury theme, so I think I can add a banner there. I can upload file in Tools->File manager, but how can I access to media/files in hbs code?

    Avatar photoBob

    All files that you will use in the source .hbs file should be served from the assets folder. Thanks to the @website.assetsUrl variable ( you can easily access these files e.g. {{@website.assetsUrl}}/images/your_image.png

    Avatar photo[anonymous]

    I see. Thanks for the clarification.

    I read the doc again,

    The File Manager tool allows for advanced users to inspect all the files generated for their website

    So the media folder is not for template use.

    Avatar photoBob
    [anonymous] wrote:

    So the media folder is not for template use.

    It may be but I do not recommend it, al the files used in the theme should be stored in the assets folder.