Jump to content

DanielDevSquare

Member
  • Posts

    2
  • Joined

  • Last visited

Everything posted by DanielDevSquare

  1. Currently the navigation is a single column. I would like to make it capable of being 2 column and to dynamically fill to fit that way. https://developers.squarespace.com/json-t-directives I want to know if there is a JSON-T Directive to get the current item being printed in a loop like this: {.repeated section items} {.collection?} {.even?} <a href="{collection.fullUrl}" class="Header-nav-folder-item{.if active} Header-nav-folder-item--active{.end}" data-test="template-nav">{collection.navigationTitle}</a> {.or} {.section externalLink} <a href="{url}"{.section newWindow} target="_blank"{.end} class="Header-nav-folder-item">{title}</a> {.end} {.end} {.end} My thought is to create 2 navigation columns based on the number of items in the dropdown navigation. I would get the number of items in the navigation by using this variable directive: {.var @myLen items|count} Then I would create another variable to find the halfway point where I should start navigation items to the other column: {.var @halfLen @myLen/2} I would then need to know what Item I am iterating on (IE whether it is element 1, 2, etc). I don't know if there is a directive for this though. After that is known I would be able to first end the first column then start the second column of this navigation menu. This should allow me to make this idea work. Is there a directive that will allow me to make this work or an alternate solution to making a 2 column layout without hardcoding the header-nav.block file? Thank you.
  2. I am Using the basic template at the moment. I have connection to the website over sftp. Is it possible to #1 add the ability to have submenus accessible to CMS users without using a different templet through code? Or is it necessary to change template to have that ability. #2 If it is possible to add this ability is it also possible to allow an image submission to the submenu. I have attached and image of what I am describing so this is more clear for readers. Thank you.
×
×
  • 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.