Jump to content

Trying to add a script to navigation on SS 7.0

Go to solution Solved by tuanphan,

Recommended Posts

I have a client who wants to add a SiteSearch360 bar just below the secondary navigation on their 7.0 site, so that it automatically populates to all pages. The website is NCBCenter.org.

Adding it to the code injection for the site adds the script above the entire header -- but they want it just below the nav. 

Is there a way to add the script to appear below the 7.0 nav automatically? Or would we have to add a code block to every page header? (There are a LOT of pages; we rebuilt the site from a legacy Concrete5 site and they had a lot of content. Also please don't judge the messy navigation -- a bunch of people made changes after I reassigned the site to their control, and they decided everything was Terribly Important and needed a prominent navigation button. Not my job to fix it at the moment.)

<section role="search" data-ss360="true">
   <input id="searchBox" type="search" placeholder="Search…" />
   <button id="searchButton"/>
</section>

<!-- Start of Site Search 360 script (put right before the closing </body> tag) -->
<script type="text/javascript">
window.ss360Config = {
    style: {
        suggestions: {
            text: {
                color: "#333333"
            },
            background: {
                color: "#ffffff"
            },
            padding: "5px",
            distanceFromTop: "0px",
            border: {
                color: "#dddddd",
                radius: "0px"
            }
        },
        searchBox: {
            text: {
                color: "#333333",
                size: "14px"
            },
            background: {
                color: "#ffffff"
            },
            border: {
                color: "#dddddd",
                radius: "0px"
            },
            padding: "8px",
            icon: {
                image: "magnifier",
                color: "#666666"
            }
        }
    },
    tracking: {
        providers: []
    },
    siteId: "www.ncbcenter.org",
    showErrors: false
};

var e=document.createElement("script");
e.async=!0;
e.src="https://cdn.sitesearch360.com/v13/sitesearch360-v13.min.js";
document.getElementsByTagName("body")[0].appendChild(e);
</script>
<!-- End of Site Search 360 script -->

 

Link to comment
  • Replies 1
  • Views 404
  • Created
  • Last Reply

Top Posters In This Topic

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.