0
Welcome Guest! Login
0 items Join Now

Change Layout container behaviour from yaml file.

  • Change Layout container behaviour from yaml file.

    Posted 7 years 4 months ago
    • Hi there!

      Is there any way to set the default container behaviour of a section using the yaml(templates/TEMPLATE/layouts/layoutschema.yaml) files, something like this:
      structure:
        showcase:
          attributes:
            boxed: 'fullwidth-flushed'
            class: 'class-for-my-section'

      By default the system uses "inherit from page setting" but I want to set a section as "Fullwidth (Flushed Content)".

      Thanks :D
    • Last Edit: 7 years 4 months ago by Unay Santisteban.
    • Matt's Avatar
    • Matt
    • Preeminent Rocketeer
    • Posts: 21571
    • Thanks: 3092
    • messin' with stuff

    Re: Change Layout container behaviour from yaml file.

    Posted 7 years 4 months ago
    • I'm not swift enough to know the YAML offhand... but, set it how you want it... then go to:

      /custom/config/[outlineID]/layout.yaml

      and you'll see the YAML that gets written ;)
    • SEARCH the forum first! These boards are rich in knowledge and vast in topics. This includes searching just the 'Solved' forums, using Google, and using ChatGPT :woohoo:
  • Re: Change Layout container behaviour from yaml file.

    Posted 7 years 4 months ago
    • Hi! thanks for the response, I want to know the syntax for that operation, I mean, yes I know that I have to change in /custom/config/[outlineID]/layout.yaml but what syntax I have to set the layout as Full Width (Flushed Content)?? Is boxed: 'fullwidth-flushed' correct or maybe I have to use another key instaed of "boxed" or a number instead of the value "fullwidth-flushed". I have checked the Hydrogen and Helium templates and I cant find an example of this :(

      Thanks again!! :D
    • Matt's Avatar
    • Matt
    • Preeminent Rocketeer
    • Posts: 21571
    • Thanks: 3092
    • messin' with stuff

    Re: Change Layout container behaviour from yaml file.

    Posted 7 years 4 months ago
    • As I mentioned before I don't know the syntax offhand... just make the setting change on one of your outlines and see what YAML Gantry writes... then you can take that same YAML and write a custom Layout preset.

      It's going to be slightly different based on the current Layout Preset and Theme you're using... so make the setting in the admin then inspect the code... if you're still struggling with it I can try and do the same and post the code (though it's really outside the scope of support, will do as time allows) but would need to know what theme, what section...

      docs.gantry.org/gantry5/advanced/creating-layout-presets
    • SEARCH the forum first! These boards are rich in knowledge and vast in topics. This includes searching just the 'Solved' forums, using Google, and using ChatGPT :woohoo:

Time to create page: 0.058 seconds