0
Welcome Guest! Login
0 items Join Now

Adding a new section in Gantry 5 Hydrogen

  • Adding a new section in Gantry 5 Hydrogen

    Posted 8 years 4 months ago
    • Hi,

      I need a couple more sections than the default layout offers, so I have followed this article in the documentation:
      docs.gantry.org/gantry5/advanced/creating-layout-presets

      I created a new yaml file in THEME_DIR/custom/layouts using only the copied and pasted code from the article:
      version: 2
      
      preset:
        image: gantry-media://images/admin/layouts/default.png
      
      layout:
        /header/:
          - menu
      
        /main/:
          - position-breadcrumbs
          - system-messages
          - system-content
      
        /mainbottom/:
          - position-mainbottom
      
        /footer/:
          - position-footer
          - [copyright 40, spacer 30, branding 30]
      
        offcanvas:
          - mobile-menu

      then i go to outlines, create a new one and load in my new layout. it works but each section name has a '/' before and after it.
      is this supposed to happen?
      am i supposed to keep the / from the example code?
      how do i have properly named sections without / before and after?

      also, when i click the cog icon on the right corner of each section, i get this message "405 Method Not Allowed

      Oops, Invalid Action."

      I don't necessarily want to create new sections, I would use the existing sections and add more rows but i need different full width backgrounds for the rows, which I can't seem to do without adding a new section. Is there a way of doing this without adding new sections?

      I would very much appreciate your assistance with this, I love Gantry 5 and the Hydrogen theme, I just need a little help making it work for me.

      Many thanks,
      Daniel
    • DanG's Avatar
    • DanG
    • Preeminent Rocketeer
    • Posts: 36750
    • Thanks: 3229
    • Custom work done

    Re: Adding a new section in Gantry 5 Hydrogen

    Posted 8 years 3 months ago
    • Daniel Merner wrote:
      I don't necessarily want to create new sections, I would use the existing sections and add more rows but i need different full width backgrounds for the rows, which I can't seem to do without adding a new section. Is there a way of doing this without adding new sections?

      For "different full width backgrounds for the rows" wouldn't a CSS solution work as you CAN target rows of the same Section.
  • Re: Adding a new section in Gantry 5 Hydrogen

    Posted 8 years 3 months ago
    • Yes a simple CSS solution would great.

      Each section has a container and the rows sit within the container, my problem is that the container isn't full screen width, it's the width of the content area. So how do I make my rows have backgrounds that are full screen width?

      I could take off the width of the container in the section and apply it with new css styles to each row, but that feels a bit hacky because I then have to make sure I add the css class to any future rows that I add.
    • DanG's Avatar
    • DanG
    • Preeminent Rocketeer
    • Posts: 36750
    • Thanks: 3229
    • Custom work done

    Re: Adding a new section in Gantry 5 Hydrogen

    Posted 8 years 3 months ago
    • If this is a site that is online (just installed, dev or live) could you please supply a link in the Public or SECURE part of your reply so we can better diagnose the issue?
      It makes our suggestions more accurate if we see the actual coding of your site.

      A description of a specific Section -> Grid (row) that you want to affect would help (I'm a bad guesser) ;)
  • Re: Adding a new section in Gantry 5 Hydrogen

    Posted 8 years 3 months ago
    • This message contains only secure information that is visible to Daniel Merner, moderators and administrators
  • Re: Adding a new section in Gantry 5 Hydrogen

    Posted 8 years 3 months ago
    • I had tried to add my own sections in by uploading a yaml file and loading it into a new outline. It didn't work properly at the time but i've just looked at it and now all of the sections are loaded in properly!
      I don't know what it was, maybe the gantry update? Anyway it strangely now works and i have my additional sections, the only problem was that i had to remove and re-insert my module positions because the system thought that they were particles and couldn't find them. which is also strange.

      thank you for your help, but it seems to have worked itself out.
      If you could offer any explanation as to what you think has happened that would be appreciated although I know you are very busy.

      thanks
    • DanG's Avatar
    • DanG
    • Preeminent Rocketeer
    • Posts: 36750
    • Thanks: 3229
    • Custom work done

    Re: Adding a new section in Gantry 5 Hydrogen

    Posted 8 years 3 months ago
    • Daniel Merner wrote:
      The area we want to affect is:
      #g-footer > .g-container > .g-grid

      i need to get that div to go full width and have a different background colour to the footer

      This will make it full width:
      #g-footer .g-container {
        width: 100%;
      }

Time to create page: 0.040 seconds