0
Welcome Guest! Login
0 items Join Now

SOLVED How to move a section

    • Paolo's Avatar
    • Paolo
    • Rocketeer
    • Posts: 62
    • Thanks: 2

    SOLVED How to move a section

    Posted 8 years 4 months ago
    • Hi,

      I'm new in Gantry and I'm trying to understand how it works. I downloaded Ambrosia and I would like to move the Navigation section above the Header section for to have the menu before the logo.

      I read the documentation here docs.gantry.org/gantry5/advanced/creating-layout-presets and searched the forum, but I only got confusing information.

      Is there a step by step tutorial? Or can you explain how I can do?

      Thanks
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: SOLVED How to move a section

    Posted 8 years 4 months ago
    • Moving sections is actually one of the more tricky things to do since you can't do it via the admin screens - you have to do it in code using YAML. But... maybe there's a different way you could do this... why do you need to move the sections at all? just move the contents of the sections instead. So just add another row into the header section and drag your menu particle into that section above the other content.

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
    • Paolo's Avatar
    • Paolo
    • Rocketeer
    • Posts: 62
    • Thanks: 2

    Re: SOLVED How to move a section

    Posted 8 years 4 months ago
    • Hi Mark,

      thank you for your useful suggestion.

      I have moved the menu in the Header section and the logo in the Navigation section.


      This image is hidden for guests.
      Please log in or register to see it.




      For to fix the style of the drop menu I reversed the name of css files: I have renamed _navigation.scss in _header.scss and the file _header.scss in _navigation.scss but this solution doesn't work: is it a wrong idea?
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: SOLVED How to move a section

    Posted 8 years 4 months ago
    • Rename those files back as they were. Never, ever, change any of our original templates files since they will be overwritten again by template updates. If you want to make any further styling adjustments you should be doing that in a custom CSS file.

      To create a custom CSS compatible with Gantry 5 please read this http://docs.gantry.org/gantry5/tutorials/adding-a-custom-style-sheet .

      Remember to recompile CSS from base outline too.


      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
    • Paolo's Avatar
    • Paolo
    • Rocketeer
    • Posts: 62
    • Thanks: 2

    Re: SOLVED How to move a section

    Posted 8 years 4 months ago
    • Thank you Mark, I'll bear in mind your suggestion.

      I had seen this tutorial, but I was looking for a solution for to import in one shot all styles from Navigation section to Header section and vice versa

      Reverse all styles from the two sections just editing the custom.scss is very tricky, at least for me. Is there a better solution for to do this?

      Regards
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: SOLVED How to move a section

    Posted 8 years 4 months ago
    • No, custom CSS is the correct answer. But I really don't see how renaming those files helped you anyway since it's all the CSS that would need to change to refer to the different section names anyway?

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
    • Paolo's Avatar
    • Paolo
    • Rocketeer
    • Posts: 62
    • Thanks: 2

    Re: SOLVED How to move a section

    Posted 8 years 4 months ago
    • Renaming the files didn't helped me, in fact I had specified "this solution doesn't work". So I have followed your suggestion renaming those files back as they were.

      I believe that if it were possible to move the entire Navigation section instead of dragging the menu particle in another section, I should avoid to correct all styles.

      Regards
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: SOLVED How to move a section

    Posted 8 years 4 months ago
    • Then you are back to the "theme" tutorials you mentioned to start with and that means editing the theme yaml. Even when you have done that you will still have to create custom CSS because there will be assumption made in the CSS about the order of the sections. Here is another link http://docs.gantry.org/gantry5/advanced/customizing-theme-files - this is pretty advanced stuff though for someone new to Gantry 5.


      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
    • Paolo's Avatar
    • Paolo
    • Rocketeer
    • Posts: 62
    • Thanks: 2

    Re: SOLVED How to move a section

    Posted 8 years 4 months ago
    • Hi,

      I have found the solution to my problem, that is reverse the sections Header and Navigation. Following the instructions in this video https://www.youtube.com/watch?v=h8nFszWlua0 It is very easy to do this, just by editing default.yaml. I have found a file default.yaml much different than the video. Reversing the code block Header and Navigation seems to work great.

      Best wishes

Time to create page: 0.042 seconds