Reputation: 1318
How does one access the information found in settings? There doesn't seem to be any documentation. I'm able to get the following to work:
{.section location}
<p class="text-center">
{.if addressLine1}{addressLine1}<br>{.end}
{.if addressLine2}{addressLine2}<br>{.end}
{.if websiteSettings.contactPhoneNumber}{websiteSettings.contactPhoneNumber}{.end}
</p>
{.end}
But how do you access:
Upvotes: 0
Views: 60
Reputation: 3707
You will find business name, contact email and other similar settings within the 'websiteSettings' scope. In some cases, such data is nested further within 'storeSettings'.
See the following example Squarespace site, displayed as JSON using the parameter format=json-pretty
(see docs).
https://websitesettings.squarespace.com/?format=json-pretty
At that link, you will be able to see the business name and contact email ("Hey, It's My Business Name" and "[email protected]" respectively). Use CTRL + F in your browser to search for either of those two terms on the page and you will find them within their respective scopes.
On the back-end, the two pieces of information were entered under 'Settings > Business Information'.
So, within a Squarespace .region, .block, .list or .item file, you would do something like this:
{.section websiteSettings}
{contactEmail}
{.section storeSettings}
{businessName}
{.end}
{.end}
Upvotes: 1