Enable Clickthrough URL on Squarespace Wexley Template

Enable Clickthrough URL on Squarespace Wexley Template

Wexley is best way to showcase your visual portfolio. Wexley’s gallery layout adapts to the size of the images in your portfolio and to your visitor’s screen width, making it perfect for artists, creative professionals and photographers who want to showcase everything up front.

But, it does not allow you to utilize the Clickthrough URL option that is available on an image within a Gallery page. Fortunately, enabling this feature is very easy, but does require a Squarespace plan higher than “Personal”.

Easy To Follow Code

If you haven’t added any code to your website before, don’t be alarmed. Below are easy to follow steps on how to implement this code on your website.

Step 1.

Open the Gallery page while in the Pages panel.

  1. Hover over the content area.

  2. Click Settings.

  3. In the Page Settings window, click Advanced in the top-right corner.

Paste the following code into the Page Header Code Injection area.

<script>
 var currentPageBaseURL=window.location.href.split("?")[0];
   Y.on("domready",function(e){
       Y.io(currentPageBaseURL+"?page=1&format=json-pretty", {
         on:{success: jsonLoaded}
     });
     function jsonLoaded(err,data){
       var jsonResponse = Y.JSON.parse(data.responseText);
       var items=jsonResponse.items
       Y.all("#thumbList .thumb, #slideshow .slide").each(function(e){
         var thumbId=this.getAttribute("data-slide-id");
         for(var i=0;i<items.length;i++){
           if(thumbId==items[i].id && items[i].clickthroughUrl){
             this.setAttribute("data-clickthrough-url",items[i].clickthroughUrl).on("click",function(e){
               e.preventDefault();
               e.stopPropagation();
               window.location = this.getAttribute("data-clickthrough-url");
             })
           }
         }
       })
     }
   });
 </script>

It should look like the following image. If it does, then click Save. You have enabled Clickthrough URL for images within that Gallery Page.

Note: If you see Premium Feature noted on this window, then you will need to update you account to a higher plan.

Squarespace-Wexley-Clickthrough-URL.png

Step 2.

In the Pages panel, click your Gallery page. Hover over the image and click the gear icon. Locate the Clickthrough URL field within the Options tab. Choose either ContentFiles, or External. Choose the respective page or enter a URL within the External tab.

Clickthrough-URL .png

Step 3. 

That is about it. Clickthrough URL is now enabled on the Wexley template.

January 2019 Squarespace Product Updates

January 2019 Squarespace Product Updates

Adding A Facebook Pixel To Your Squarespace Website

Adding A Facebook Pixel To Your Squarespace Website

0