限制cq5中模板中允许的组件 [英] Limiting allowed components in a template in cq5

查看:66
本文介绍了限制cq5中模板中允许的组件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个模板,想要限制为仅使用组件的某些子集。我已经创建了模板,设置了要在设计模式下使用的组件,一切看起来都很不错,但是当我导出该模板并将其安装在另一个cq5实例上时,为该模板设置的组件列表将消失。知道如何让他们坚持吗?

I have a template that I want to limit to only using a certain subset of components. I've created the template, set the components I want to use in design mode and everything looks great, but when I export that template and install it on another cq5 instance the component list that I've set for that template vanish. Any idea how to get them to stick?

推荐答案

以上答案是正确的,但是如果您需要更多信息,作为模板实现的一部分,您可以定义列表通过定义以下属性,可以在模板的辅助控件中呈现的组件数量。

The above answer is correct, but if you need more info, as part of the template implementation, you can define the list of components that will be rendered in the sidekick for your template by defining the following property.

components="[/libs/foundation/components/text,/libs/foundation/components/textimage]">

这将位于以下节点(此处为xml格式)下

This will sit under the following node (xml format here)

<TEMPLATENAME jcr:primaryType="nt:unstructured">
    <content
            jcr:lastModified="{Date}2014-04-11T13:04:48.855+10:00"
            jcr:lastModifiedBy="admin"
            jcr:primaryType="nt:unstructured"
            sling:resourceType="/libs/foundation/components/parsys"
            components="[/libs/foundation/components/text,/libs/foundation/components/textimage]">
        </content>
</TEMPLATENAME>

只要将此项目带到另一个实例,就将保留设置。

As long as you take this with your project to another instance, you'll keep the settings.

总是随身携带/ etc / designs / projectDesignName目录

always take /etc/designs/projectDesignName directory with you

这篇关于限制cq5中模板中允许的组件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆