如何在AEM中从siteadmin隐藏页面?

时间:2016-05-27 10:11:05

标签: servlets cq5 aem jcr sling

我有一个带有resourceType =&#34的Sling Servlet;这个/是/ a / test"。

@SlingServlet(methods = { "GET" })
@Properties({ @Property(name = "service.pid", value = "com.test.TestServlet", propertyPrivate = false),
    @Property(name = "sling.servlet.resourceTypes", value = {"this/is/a/test"})})
public class TestServlet extends SlingSafeMethodsServlet {

我的蓝图中有品牌和区域设置的MSM结构。

    SampleBlueprint
        Organization One
            en_US
               Home Page
               Contact US
               bin
                  test-servlet

   SampleLiveCopies
        Organization One
           America
              en_US
                 Home Page
                 Contact US
                 bin
                    test-servlet
              fr_US
                 Home Page
                 Contact US
                 bin
                    test-servlet
           Canada
              en_CA
                 Home Page
                 Contact US
                 bin
                    test-servlet

test-servlet有sling:resourceType ="这个/是/ a / test"。

在servlet中,我正在利用路径来确定响应。 例如: 如果path是/ content / SampleLiveCopies / OrganizationOne / America / en_US / bin / test-servlet 我会返回与英语有关的美国数据。

但是正如Page" bin / test-servlet"在siteadmin中可见,作者可以编辑它。

因此我想在siteadmin中隐藏bin / test-servlet页面。

1 个答案:

答案 0 :(得分:3)

当您想隐藏页面时 - 您在页面的 jcr:content 上使用隐藏属性值 true 。我打赌,会有类似的方法。试一试。