<footer class="footer">
    <div class="container wrap">

        <div class="footer__menu-cta-wrapper">

            <div class="footer__menu">
                {{/* Store menu items without children in a Scratch */}}
                {{ $.Scratch.Set "noChildrenItems" slice }}

                {{ with .Site.Menus.main }}

                {{/* First, loop through to filter out items with no children and store them */}}
                {{ range . }}
                {{ if not .HasChildren }}
                {{