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.

Changing .hbs theme files not working

  • #602
    Avatar photo[anonymous]

    I change .hbs files and render the theme on, but nothing changes on view.

    What is happening?

    Avatar photoBob

    Any example?

    Avatar photo[anonymous]

    From the theme Tattoo, I’ve added to top.hbs

    “{{#if @config.custom.uploadHero}}
                   {{#checkIf @config.custom.lazyLoadEffect ‘!==’ “lqip” }}
                   {{responsiveSrcSet @config.custom.uploadHero}}
                {{#if @config.custom.uploadHeroCaption}}
    and I’ve changed at index.hbs :
    “<time datetime=”{{date @website.lastUpdate ‘YYYY-MM-DDTHH:mm’}}”>”
    to “<time datetime=”{{date @website.lastUpdate ‘DD-MM-YYYY’}}”>”,
    but nothing change.
    Avatar photoBob

    Please attach your website backup here (PM)

    Avatar photo[anonymous]

    Please, download here: LINK.


    Avatar photoBob

    It works for me:


    I suppose where the problem is; if you want to override the original theme files, you need to create a directory with the original theme name and add a suffix to it, for example:

    If your original theme is a fiesta, create the fiesta-1629 directory and add here the files you want to overrides e.g. index.hbs. When you want to override the partials files, create a partials folder in the fiesta-1629 directory and then create a copy of the top.hbs file within that.

    Avatar photo[anonymous]

    It’s working! Thanks a lot!!

    PS: To be quickly, I’m changing the version at config.json, closing publii app and then open it, selecting the theme with new version number and clicking “save and preview”.