【发布时间】:2016-08-01 12:19:27
【问题描述】:
我在我们的网站上创建一个已经有可编辑页面的静态页面模板时遇到了问题。我不确定我是否只是创建了错误的模板、缺少必需的调用,或者是否存在配置模板导致 AEM 不检查应用程序中的模板。
我在应用程序中定义了我的静态模板,this documentation 说要定义一个静态模板
apps/<site-name>/templates/<template-name>
我的可编辑模板在
content/conf/<site-name>/settings/wcm/templates
我尝试将我的静态模板添加到 conf 模板目录中,然后在创建新页面时显示为一个选项,但在页面创建期间的属性选项卡为空,并且创建按钮显示为灰色。
这是我的应用程序静态模板 .content.xml
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:mix="http://www.jcp.org/jcr/mix/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
jcr:description="Bio Page"
jcr:mixinTypes="[mix:lockable]"
jcr:primaryType="cq:Template"
jcr:title="Bio Page"
allowedPaths="[/content(/.*)?]"
ranking="{Long}3">
<jcr:content
cq:designPath="/etc/designs/<site>"
jcr:primaryType="cq:PageContent"
sling:resourceType="<site>/components/structure/static-page/bio"
cq:template="/apps/<site>/templates/bio-page">
</jcr:content>
</jcr:root>
【问题讨论】:
-
不清楚,你要修复什么。您希望您的静态模板在 /apps 下工作(6.2 之前的模板过去的工作方式)还是希望它成为使用模板编辑器的可配置模板?