【问题标题】:Business Information in Squarespace Developer PlatformSquarespace 开发者平台中的商业信息
【发布时间】:2016-12-18 07:26:33
【问题描述】:

如何访问设置中的信息?似乎没有任何文档。我能够使以下工作:

{.section location}
<p class="text-center">
    {.if addressLine1}{addressLine1}<br>{.end}
    {.if addressLine2}{addressLine2}<br>{.end}
    {.if websiteSettings.contactPhoneNumber}{websiteSettings.contactPhoneNumber}{.end}
</p>
{.end}

但是你如何访问:

  • 公司名称
  • 联系邮箱

【问题讨论】:

    标签: squarespace


    【解决方案1】:

    您会在“网站设置”范围内找到公司名称、联系电子邮件和其他类似设置。在某些情况下,此类数据会进一步嵌套在“storeSettings”中。

    请参阅以下 Squarespace 网站示例,使用参数 format=json-pretty (see docs) 显示为 JSON。

    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}
    

    【讨论】:

      猜你喜欢
      • 2010-12-06
      • 2018-03-09
      • 1970-01-01
      • 1970-01-01
      • 2014-10-16
      • 2020-04-13
      • 2021-12-26
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多