LogoLogo
Manifold for Developers
Manifold for Developers
  • Introduction
  • Shopify Merch Bridge
    • Overview
    • Tutorial
      • Step 1: Product Gate Setup
        • 1.1: Configure the Product
        • 1.2: Install Manifold Merch Bridge
        • 1.2: Create a New Product Gate
        • 1.3: Link a Product to the Gate
        • 1.4: Add Rules
      • Step 2: Store Theme Setup
        • 2.1 The Theme Editor
        • 2.2 Product Page Setup
        • 2.3 Cart Page Setup
    • Advanced Configuration
    • FAQ / Error Help
    • Reference
      • Product and Gate Configuration
        • Shopify Products
        • Product Gates
          • Gate Products
          • Rules
      • Custom Themes
      • Updating to the Latest Version
      • UI Configuration Options
      • Advanced Usage
      • Common Issues
  • Guides
    • Getting Started
    • HTML
    • React
    • NextJS
    • Vue
    • Wix
    • Squarespace
      • Simple Squarespace Site
      • Customised Squarespace Template
  • Resources
    • Apps
      • Grant Types
    • Widgets
      • Directory
      • Manifold CSS Variables
        • Scheme Utility Classes
        • List of Manifold CSS Variables
      • Connect Widget
        • Blockchain Interaction
        • Wallet Authentication
        • Data Client
          • NFT Information Retrieval
            • getNFT
            • getNFTsOfOwner
            • ownerHasNFT
            • getCollectors
          • Data Storage and Retrieval
        • Advanced Configuration
        • Customization & Styling
        • Automatic Error Handling
      • Campaign Widget
        • Campaign Creation
          • Questionnaire
        • Campaign Progress
        • Customization & Styling
      • Curation Widget
      • Marketplace Widgets
        • Widgets
          • Data Attributes
          • Layout Widgets
          • Card Widgets
          • Listing Widgets
        • Window Events
        • Troubleshooting
        • Customization & Styling
        • Version Change Notes
          • 3.2.1 - CSS Selector Changes
          • 3.1.1 - CSS Selector Changes
      • Claim Widgets
        • Widgets
          • Data Attributes
          • Complete Claim Widget
          • Buy Button Only Widget
          • Mint Count Widget
        • Troubleshooting
        • Customization & Styling
        • Version Change Notes
          • 1.7.0, 1.7.1 - CSS Selector Changes
      • Restricted Token Widget
        • Customization & Styling
      • Wallet Identity Widget
        • Customization & Styling
      • Subscription Widget
      • 6551 Display Widget
    • Manifold Ethereum Provider
  • Tools and APIs
    • Merkle Tree Tool
    • Snapshot Tool
    • Discord Tools
    • Server-Side Session Authentication
      • Signature Grant
      • Authorization Code Grant
  • Smart Contracts
    • Manifold Creator
      • Contracts
        • Creator Core
          • Common Functions
          • ERC721 Functions
          • ERC1155 Functions
        • Extensions
          • Extensions Functions
          • Extensions Examples
          • Extensions Deployment Guide
            • Dynamic NFT Extension
            • Lazy Mint Extension ERC1155
            • Lazy Mint Extension ERC721
        • Mint Permissions
          • Mint Permissions Functions
      • Prior Versions
        • 1.0.x
          • Creator Core
            • Common Functions
            • ERC721 Functions
            • ERC1155 Functions
          • Extensions
            • Extensions Functions
            • Extensions Examples
            • Extensions Deployment Guide
              • Dynamic NFT Extension
              • Lazy Mint Extension ERC1155
              • Lazy Mint Extension ERC721
          • Mint Permissions
            • Mint Permissions Functions
        • 2.0.x
          • Creator Core
            • Common Functions
            • ERC721 Functions
            • ERC1155 Functions
          • Extensions
            • Extensions Functions
            • Extensions Examples
            • Extensions Deployment Guide
              • Dynamic NFT Extension
              • Lazy Mint Extension ERC1155
              • Lazy Mint Extension ERC721
          • Mint Permissions
            • Mint Permissions Functions
    • Marketplace
      • Identity Verifier
    • Royalty Registry
  • Contact Us
Powered by GitBook
On this page
  • Prerequisites
  • Installing Widgets
  • Using Widgets
  • Styling
  • Examples

Was this helpful?

  1. Guides
  2. Squarespace

Customised Squarespace Template

Last updated 1 year ago

Was this helpful?

This page assumes you have programming knowledge about Squarespace development. Squarespace's developer quick start documentation can be found .

Prerequisites

  1. Create a Squarespace site with a template that can have access to developer mode.

  2. Set up your Squarespace development environment.

  3. To publish your site at a later date, you will need a Business or a Commerce plan in order to keep the custom code.

The following documentation assumes a simple site with one site.region file.

Installing Widgets

Each widget comes with a Javascript and CSS file. To add a widget to your website, you will need to add its corresponding Javascript and CSS in the head tag of your site.region file.

Copy and paste the code below into the code snippet box.

<!-- connect widget -->
<script async src="https://connect.manifoldxyz.dev/2.0.13/connect.umd.min.js"></script>
<link rel="stylesheet" href="https://connect.manifoldxyz.dev/2.0.13/connect.css" />
<!-- marketplace widget -->
<script async src="https://marketplace.manifoldxyz.dev/latest/marketplace.umd.min.js"></script>
<link rel="stylesheet" href="https://marketplace.manifoldxyz.dev/latest/marketplace.css" />

The uri for the Javascript and CSS for each widget is as follows:

https://<WIDGET_NAME>.manifoldxyz.dev/<WIDGET_VERSION>/<WIDGET_NAME>.umd.min.js
https://<WIDGET_NAME>.manifoldxyz.dev/<WIDGET_VERSION>/<WIDGET_NAME>.css

If you always want the latest version, use latest for the <WIDGET_VERSION>. However, due to the changing nature of the codebase, it is possible that the "newer" latest is no longer compatible with the "previous" latest used to develop the app. It is thus recommended that you use a specific version of a widget for consistent results.

Using Widgets

Through HTML

Use widgets as you would through regular HTML by providing a div the necessary data-attributes of the widget you'd like to inject. Place these div blocks in the *.block files of your Squarespace template.

Through Squarespace's editor

You can include and display Manifold Gallery listings in a specific way in predefined Squarespace collections through the CMS.

To do so, you have to:

  1. define your custom Manifold Gallery listing type;

  2. add/modify the collection's configuration file to accept the new, custom type;

  3. add/modify the collection's .item and/or .list template(s) to display what you want to display by using the custom type's information.

1 - Define a custom Manifold Gallery listing type

In template.conf, add the following type definition in the customTypes array:

{
  "title": "Manifold Gallery Listing", // CMS display name
  "name": "manifoldGalleryListing",
  "base": "image",
  "fields": [
    {
      "name": "listingId",
      "title": "Listing ID",
      "type": "text"
    },
    {
      "name": "network",
      "title": "Network",
      "type": "text"
    },
    {
      "name": "version",
      "title": "Marketplace Version",
      "type": "text"
    },
    {
      "name": "useListingName",
      "title": "Use On-Chain Listing Name",
      "type": "checkbox"
    },
    {
      "name": "useListingDescription",
      "title": "Use On-Chain Listing Description",
      "type": "checkbox"
    }
  ]
}

2 - Add/Modify the collection's configuration

Add manifoldGalleryListing to the list of accepted types in the .conf file of the collection you want to modify.

// gallery.conf
{
  "title" : "Gallery",
  "ordering" : "user-orderable",
  "pageSize" : 9999,
  "addText" : "Add Images or Videos",
  "icon" : "gallery",
  "acceptTypes" : [ "image", "video", "manifoldGalleryListing" ]
}

3 - Add/Modify the collection's template file(s)

In the .item and/or the .list template file(s), use the custom properties to display the custom post type the way you want.

<!-- gallery.list -->
<!-- ... -->
<div id="slideshow">
  {.repeated section items}
    <div class="slide" data-slide-id="{id}" data-slide-url="{urlId}">
      {.equal? customContent.customType "manifoldGalleryListing"}
        {.section customContent}
          <div data-widget="m-listing-image-expandable" data-id="{@.listingId}" data-network="{@.network}" data-version="{@.version}"></div>
        {.end}
      {.or}
        {.image?}
          <img {@|image-meta} data-load="false"/>
          <noscript><img src="{assetUrl}?format=1500w"></noscript>
        {.end}
        {.video?}{@|video}{.end}
      {.end}
    </div>
  {.end}
</div>
<!-- ... -->

Styling

Widgets are styled using standard CSS. As Less is supported by Squarespace, you can also write styles using Less.

Examples

You can find a list of widgets, versions and links .

For more detailed examples, see the .

This leverages .

Tweaks are also integrable with Manifold widget code as long as they are properly defined. You can find more about Squarespace tweaks .

See the for examples on how to include custom Manifold widget styling.

Examples of commonly used features can be found . Please feel free to use this as a starting point to building your own dApp.

here
v7.0 Squarespace templates
Squarespace developer quick start
here
Manifold templates repository
Squarespace's custom post types
here
Manifold templates repository
here
Custom post type appearing as an option in Squarespace CMS