Jump to content

[Share] Folder within Folder

Recommended Posts

I will give some simple code to create Folder within Folder.

image.png.947d654a44dc70cf1ae73a5132384a1f.png

If you can't make it work, you can send site url + code you added, I will check easier.

#1. Suppose we have a Folder Sections with items: Testimonials, list carousel, 3d carousel, gallery…

We need to create a folder within Testimonials, list carousel.

image.png.41eb7752a4d170e7ba6df04cbac961a2.png

#2. Edit Site Footer

image.png.38ed8ec5c14c0ae1bb3af5221fd6d102.png

Add 2 Text Blocks

image.png.0d391bc467f6ee3d3e2e1d934b9ac355.png

something like this

image.png.758de81c194939ce7834b54c5e8c80bc.png

#3. Use this tool to find the ID of 2 Text Blocks.

In my example, we will have:

  • Testimonials: #block-9db6127131ff6ca96f27
  • List carousel: #block-d0631acca646a3cf9960

image.png.05228004cd5864d148f7e578aeffe064.png

#4. Find the ID of 2 Folder Testimonials, list carousel in the Navigation Menu.

We will have

  • Sections: div.header-nav-item:nth-child(6)
  • Testimoinals: div.header-nav-item:nth-child(6) div.header-nav-folder-content>div:nth-child(1)
  • List carousel: div.header-nav-item:nth-child(6) div.header-nav-folder-content>div:nth-child(2)

image.png.d4991ec2b36bc6a94ee907fdb51e336a.png

#5. Use this code to Code Injection Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
// testimonials
    $('#block-9db6127131ff6ca96f27').appendTo('div.header-nav-item:nth-child(6) div.header-nav-folder-content>div:nth-child(1)');
// list carousel
    $('#block-d0631acca646a3cf9960').appendTo('div.header-nav-item:nth-child(6) div.header-nav-folder-content>div:nth-child(2)');
});
</script>
<style>
div.header-nav-item--folder .html-block {
    position: absolute;
    background-color: #3308f6;
    right: -167px;
    padding-left: 17px;
    width: 150px;
    top: 0px;
    display: none;
}
div.header-nav-item--folder a:hover + .html-block {
    display: block;
}</style>

image.png.c0eb1e2450db238393b73fdd3f595888.png

#6. Result

When hovering on the link: Testimonials

image.png.947d654a44dc70cf1ae73a5132384a1f.png

When hovering on the link: list carousel

image.png.2f4b524a026682181d14e1c8e984ae90.png

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • Replies 0
  • Views 270
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.