0
Welcome Guest! Login
0 items Join Now

Where to override Sample Content particle?

    • Mike Feng's Avatar
    • Mike Feng
    • Sr. Rocketeer
    • Posts: 197
    • Thanks: 1

    Where to override Sample Content particle?

    Posted 8 years 1 month ago
    • Hi

      I'm trying to override the output of the Sample Content particle, basically adding a URL and itemprop="image" to the image. However, I can't find the relevant twig file. Where can I find the twig of sample content? And in the event that the twig does not allow me to modify the <img> output, where can I modify/override this?
    • My extensions: http://www.simbunch.com/
      http://twitter.com/simbunch
    • Mike Feng's Avatar
    • Mike Feng
    • Sr. Rocketeer
    • Posts: 197
    • Thanks: 1

    Re: Where to override Sample Content particle?

    Posted 8 years 1 month ago
    • Ok I found the twig file. Apparently, only Hydrogen has this particle type, so it's located in /templates/g5_hydrogen/particles/sample.html.twig

      The problem is, modifying this file doesn't seem to change anything (I'm thinking it's a cache issue, but I've cleared both browser and server cache). I tried adding an override in /templates/g5_hydrogen/engine/particles/sample.html.twig but that didn't work as well.
    • My extensions: http://www.simbunch.com/
      http://twitter.com/simbunch
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: Where to override Sample Content particle?

    Posted 8 years 1 month ago
    • Mike Feng's Avatar
    • Mike Feng
    • Sr. Rocketeer
    • Posts: 197
    • Thanks: 1

    Re: Where to override Sample Content particle?

    Posted 8 years 1 month ago
    • Beautiful! Thanks!

      To anybody else who may have the same problem, the custom override path for template-specific particles is in /templates/<TEMPLATE>/custom/particles, instead of /templates/<TEMPLATE>/custom/engine/particles
    • Last Edit: 8 years 1 month ago by Mike Feng.
    • My extensions: http://www.simbunch.com/
      http://twitter.com/simbunch

Time to create page: 0.046 seconds