如何访问设置中找到的信息? 似乎没有任何文件。 我能够得到以下工作:
{.section location} <p class="text-center"> {.if addressLine1}{addressLine1}<br>{.end} {.if addressLine2}{addressLine2}<br>{.end} {.if websiteSettings.contactPhoneNumber}{websiteSettings.contactPhoneNumber}{.end} </p> {.end}但是你怎么访问:
商家名称 联系电子邮件 等等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:
Business Name Contact Email etc.最满意答案
您可以在“网站设置”范围内找到公司名称,联系电子邮件和其他类似设置。 在某些情况下,此类数据会在“storeSettings”中进一步嵌套。
请参阅以下示例Squarespace站点,使用参数format=json-pretty显示为JSON( 请参阅docs )。
https://websitesettings.squarespace.com/?format=json-pretty
在该链接中,您将能够看到公司名称和联系电子邮件(分别是“ 嘿,这是我的公司名称 ”和“ mycontactemail@mybusiness.com ”)。 在浏览器中使用CTRL + F在页面上搜索这两个术语中的任何一个,您将在各自的范围内找到它们。
在后端,这两条信息在“设置>商业信息”下输入。
因此,在Squarespace .region,.block,.list或.item文件中,您可以执行以下操作:
{.section websiteSettings} {contactEmail} {.section storeSettings} {businessName} {.end} {.end}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 "mycontactemail@mybusiness.com" 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}更多推荐
发布评论