0
Welcome Guest! Login
0 items Join Now

Validation error with custom gantry layout.yaml

    • Luke Douglas's Avatar
    • Luke Douglas
    • Hero Rocketeer
    • Posts: 322
    • Thanks: 15
    • Another Old Hack!

    Validation error with custom gantry layout.yaml

    Posted 7 years 9 months ago
    • I modified the 'home' layout.yaml file to split up part of the 'footer' section. This is a development site but I have put online for anyone to view and diagnose this issue. URL is http://divorcetoolbox.net
      /footer/:
          -
            - position-footer
          -
            -
              'footer-left 35':
                -
                  - position-position-2857
            -
              'footer-center 30':
                -
                  - social-7688
                -
                  - position-module-9113
            -
              'footer-right 35':
                -
                  - position-position-9575

      However, I am getting W3C validation 'errors'.
      Error: The element footer must not appear as a descendant of the footer element.
      
      From line 841, column 21; to line 841, column 47
      
                <footer id="g-footer-left">↩     
      
      Error: The element footer must not appear as a descendant of the footer element.
      
      From line 908, column 21; to line 908, column 49
      
                <footer id="g-footer-center">↩     
      
      Error: The element footer must not appear as a descendant of the footer element.
      
      From line 994, column 21; to line 994, column 48
      
                <footer id="g-footer-right">↩     

      It's working but can someone explain exactly why I am getting these errors?
    • Just another old hacker!
    • Matt's Avatar
    • Matt
    • Preeminent Rocketeer
    • Posts: 21649
    • Thanks: 3104
    • messin' with stuff

    Re: Validation error with custom gantry layout.yaml

    Posted 7 years 9 months ago
    • sounds like you got a <footer> inside of a <footer>

      www.w3.org/TR/html-markup/footer.html
    • Last Edit: 7 years 9 months ago by Matt.
    • 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:
    • Luke Douglas's Avatar
    • Luke Douglas
    • Hero Rocketeer
    • Posts: 322
    • Thanks: 15
    • Another Old Hack!

    Re: Validation error with custom gantry layout.yaml

    Posted 7 years 9 months ago
    • Matt,

      You are correct.

      Here is how I have setup my footer layout.

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


      Here is the layout.yaml code for the footer area:


       /footer/:
          -
            - 'footer-full 100':
          -
            -
              'footer-left 35':
                -
                  - position-module-2857
            -
              'footer-center 30':
                -
                  - 'social-7688 100'
                -
                  - 'position-module-9113 100'
            -
              'footer-right 35':
                -
                  - position-module-9575


      Here is the validation source:


                          <footer id="g-footer">↩
                      <div class="g-container">                        ↩
      ↩
          <div          ↩
               class="g-grid">↩
                                    ↩
      ↩
          <div         ↩
               class="g-block size-100">↩
                                                      ↩
      ↩
      ↩
          ↩
          ↩
                          <footer id="g-footer-center">↩
                                      ↩
      ↩
          <div          ↩
               class="g-grid">↩
                                    ↩
      ↩
          <div id="bottom-social"        ↩
               class="g-block size-100">↩
                                                      <div class="g-content g-particle">↩
                                      <h2 class="g-title">Social</h2>    <div class="g-social social">↩
                          <a target="_blank" href="https://www.facebook.com/divorcetoolbox" title="">↩
                      <span class="fa fa-facebook"></span>↩
                      <span class="g-social-text"></span>↩
                  </a>↩
                          <a target="_blank" href="https://plus.google.com/u/0/105427259432462573513/posts" title="">↩
                      <span class="fa fa-google-plus"></span>↩
                      <span class="g-social-text"></span>↩
                  </a>↩
                          <a target="_blank" href="https://twitter.com/DivorceToolBox" title="">↩
                      <span class="fa fa-twitter"></span>↩
                      <span class="g-social-text"></span>↩
                  </a>↩
                          <a target="_blank" href="https://www.pinterest.com/DivorceToolBox/" title="">↩
                      <span class="fa fa-pinterest-p"></span>↩
                      <span class="g-social-text"></span>↩
                  </a>↩
                          <a target="_blank" href="https://www.youtube.com/channel/UCP8_s4BcHeYyS8rax4NF80w" title="">↩
                      <span class="fa fa-youtube"></span>↩
                      <span class="g-social-text"></span>↩
                  </a>↩
                  </div>↩
                  ↩
          </div>↩
                              ↩
          </div>↩
                  ↩
          </div>↩
      ↩
      ↩
                  ↩
          </footer>↩
          ↩
                                  ↩
          </div>↩
                  ↩
          </div>↩
      ↩
      ↩
                  </div>↩
              ↩
          </footer>↩


      As you indicated, there is a <footer> tag embedded within the original <footer> tag. Can you tell me what mistake I made in editing the layout.yaml file that created this issue?
    • Just another old hacker!
    • Matt's Avatar
    • Matt
    • Preeminent Rocketeer
    • Posts: 21649
    • Thanks: 3104
    • messin' with stuff

    Re: Validation error with custom gantry layout.yaml

    Posted 7 years 9 months ago
    • You don't have your main Container properly defined... If you want this section to behave like a wrapper you should mimic the instructions for creating sidebars...

      Unless you have content that needs to vertically span it's neighbors (like your footer-center) you don't need a wrapper... so "full" doesn't need to live in the Container for example... for left-right-center in your example it does makes sense though.

      Essentially you've defined Sections within Sections (the single ticks you have around your Section names)... you need a container/wrapper

      docs.gantry.org/gantry5/advanced/creatin...te-a-sidebar-section
    • 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:
    • Luke Douglas's Avatar
    • Luke Douglas
    • Hero Rocketeer
    • Posts: 322
    • Thanks: 15
    • Another Old Hack!

    Re: Validation error with custom gantry layout.yaml

    Posted 7 years 9 months ago
    • Matt,

      Thanks. Just a clarification. You stated:
      so "full" doesn't need to live in the Container for example

      Now if I remove the 100% width footer block and only leave the 3 - 1/3 width blocks, if I needed to have something in the footer that spanned the full width, are you saying that I could put something in footer-a and if there is nothing in footer-b and footer-c that then footer-a would span 100% of the page width?
    • Just another old hacker!
    • Matt's Avatar
    • Matt
    • Preeminent Rocketeer
    • Posts: 21649
    • Thanks: 3104
    • messin' with stuff

    Re: Validation error with custom gantry layout.yaml

    Posted 7 years 9 months ago
    • I think the answer is 'Yes'... but it depends what you mean by footer-a, footer-b, footer-c... that concept doesn't really exist in Gantry 5 unless you custom define positions like that with Position Particles... if you're referring to your new footer-left, footer-center, and footer-right, then 'No'.
    • 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:
    • Luke Douglas's Avatar
    • Luke Douglas
    • Hero Rocketeer
    • Posts: 322
    • Thanks: 15
    • Another Old Hack!

    Re: Validation error with custom gantry layout.yaml

    Posted 7 years 9 months ago
    • Matt,

      Thanks. Yes, I wanted the ability to have a block that was 100% width and three blocks that were 1/3 across each. It has been my experience in footers that you sometimes need content that goes 100% across but you sometimes need multiple modules to be displayed vertically in a 1/3 width block or, on other websites, a 50% width block. That was my reasoning for creating that section.
    • Just another old hacker!
    • Matt's Avatar
    • Matt
    • Preeminent Rocketeer
    • Posts: 21649
    • Thanks: 3104
    • messin' with stuff

    Re: Validation error with custom gantry layout.yaml

    Posted 7 years 9 months ago
    • In my opinion then you don't need a custom layout file at all then...

      Remember, you're not restricted to a single Outline... you can create as many new Outlines as you want and apply them to whatever page they need to be used on, mocked up however you need. So one outline could have a single Grid in the Footer Section with either a full-width Position Particle in it or a fullwidth Particle of whatever-type in it.

      Another Outline could thusly have 3 Position Particles in it (mapped to footer-a, footer-b, or footer-c for example) or you could simply have 3 Particles of whatever-type place in it.

      If you wanted both on one page/Outline just stick 2 Grids in the Footer section and mock them up as just described...

      If you wanted a single Outline that was flexible for either scenario on multiple pages then use Position Particles strictly:

      Footer Section
      > 2 Grids
      >> First Grid: 1 Full Width Position Particle mapped to (for example) 'footer-full'
      >> Second Grid: 3 Position Particles mapped to (for example) 'footer-a', 'footer-b', and 'footer-c'

      In this last scenario everything would then be controlled via the Joomla Module Manager... if a Module is not assigned to one of the positions on a particular page then the position will collapse.

      If I lost you anywhere: docs.gantry.org/gantry5/configure/layout-manager#layout
    • 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:
    • Luke Douglas's Avatar
    • Luke Douglas
    • Hero Rocketeer
    • Posts: 322
    • Thanks: 15
    • Another Old Hack!

    Re: Validation error with custom gantry layout.yaml

    Posted 7 years 9 months ago
    • Matt,

      OK, I think I understand what you are saying and I agree. Now is there any overhead if I create sections in my layout that are 'not' used on particular pages?
    • Just another old hacker!
    • Matt's Avatar
    • Matt
    • Preeminent Rocketeer
    • Posts: 21649
    • Thanks: 3104
    • messin' with stuff

    Re: Validation error with custom gantry layout.yaml

    Posted 7 years 9 months ago
    • No :)

      They simply won't output/render
    • 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.060 seconds