如何在Squarespace Developer模式下修改集合的.item模板?

问题描述:

我想在Developer模式下修改Native模板的现有blog.item模板。我想知道这是否可行,因为当我修改文件并上传回服务器时,没有发现任何更改,正如我在Chrome开发人员工具中看到的。例如,我添加了一个类到一个div,保存并上传,我的FTP管理器显示成功,但是当我在开发人员工具中检查时,该类不在那里。我已注销(FTP)并返回。我知道FTP正在工作,因为tweak.less文件工作正常。如何在Squarespace Developer模式下修改集合的.item模板?

此外,特别是我想编辑的是文章元。作者,日期,喜欢为每个帖子显示。我的意思是,一般来说,我认为这与平方空间系统变量有关,这可能是我为什么似乎无法编辑它的原因?

编辑************ 这里要说的是在那里的blog.item文件

<header> 
      {.if title}<h1 class="entry-title" data-content-field="title" itemprop="headline">{.passthrough?}<a href="{sourceUrl}">{title} <span>&rarr;</span></a>{.or}<a href="{fullUrl}">{title}</a>{.end}</h1>{.end} 
      <div class="article-meta-top"> 
     {.section location}<div class="location">{.if addressTitle}<a href="//maps.google.com/maps?q={mapLat},{mapLng}" target="_blank" title="View map in new window"><i class="icon-map-marker"></i>{addressTitle}</a>{.end}</div>{.end} 
     <span class="date"><a href="{fullUrl}"><time class="published" datetime="{addedOn|date %F}" itemprop="datePublished">{addedOn|date %B %d, %Y}</time></a></span> 
     {.section author}<span class="author"><a href="{collection.fullUrl}?author={id}" rel="author">by {displayName}</a></span>{.end} 
     {.section categories}<span class="categories">in {.repeated section @}<a href="{collection.fullUrl}?category={@|url-encode}" rel="tag">{@}</a>{.alternates with}, {.end}</span>{.end} 

然后代码我简单想移动是在后尾有张贴标题,所以我采取了后页脚代码,并将其移到那里。

<header> 
      {.if title}<h1 class="entry-title" data-content-field="title" itemprop="headline">{.passthrough?}<a href="{sourceUrl}">{title} <span>&rarr;</span></a>{.or}<a href="{fullUrl}">{title}</a>{.end}</h1>{.end} 
      <div class="article-meta"> 
        <span class="date"><a href="{fullUrl}"><i class="icon-calendar"></i><time class="published" datetime="{addedOn|date %F}" itemprop="datePublished">{addedOn|date %B %d, %Y}</time></a></span> 
        {.section author}<span class="author"><span class="delimiter">/</span><a href="{collection.fullUrl}?author={id}" rel="author"><i class="icon-user"></i>{displayName}</a></span>{.end} 
        {.passthrough?}{.or}{.section sourceUrl}<span class="source"><span class="delimiter">/</span><a href="{sourceUrl}" target="_blank"><i class="icon-share"></i>Source</a></span>{.end}{.end} 
        {.section tags}<div class="tags"><i class="icon-tag"></i>{.repeated section @}<a href="{collection.fullUrl}?tag={@|url-encode}" rel="tag">{@}</a>{.alternates with}, {.end}</div>{.end} 
        {.section categories}<div class="categories"><i class="icon-bookmark"></i>{.repeated section @}<a href="{collection.fullUrl}?category={@|url-encode}" rel="tag">{@}</a>{.alternates with}, {.end}</div>{.end} 

        <div class="shareLoveButtons"> 
        {@|like-button} 
        {@|social-button-inline} 
        {postItemInjectCode} 
        </div> 
       </div> 

我意识到这可能是特定的社会问题,所以我不问如何让每本身这个工作,只是如果它应该工作。如果不是,为什么?我在哪里可以找到相关文档?我查看了所有的开发者文档,但我没有看到它在那里谈论的内容。是否有关于我缺少的注释或代码注入?

我会首先仔细检查你的FTP设置。实际上,不支持FTP协议,只有SFTP和Git。请务必遵循以下说明:http://developers.squarespace.com/initial-setup

我可以通过使用Squarespace Developer Mode 24/7告诉你,我没有遇到过我的更新没有到达服务器的问题,所以我的猜测是你的SFTP应用程序配置不正确。

您能否将下载模板文件先传到您的电脑?从你的措辞来看,这听起来像你能够做到的。

CMS内部的“开发人员”页面显示什么内容?它应该在那里显示你的SFTP/Git活动。

+0

“开发者”页面日志显示我已经多次上传blog.item文件。是的,我也使用SFTP。再次,我的tweek.less上传工作正常。我改变了那里或者.region文件中的任何东西,并且按预期工作。 – user56258

+0

另外,当我从SFTP重新下载blog.item文件时,它确实显示了我所做的更改。尽管如此,它并不影响实时页面。 – user56258