我有一个带有resourceType =“ this / is / a / test”的Sling Servlet。
@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
测试servlet带有sling:resourceType =“ this / is / a / test”。
在servlet中,我利用路径来确定响应。例如:如果路径是/ content / SampleLiveCopies / OrganizationOne / America / en_US / bin / test-servlet,我将返回与美国相关的英语数据。
但是由于页面“ bin / test-servlet”在siteadmin中可见,因此作者可以控制对其进行编辑。
因此,我想在siteadmin中隐藏bin / test-servlet页面。
当您要隐藏页面时,可以在页面的jcr:content上使用值为true的hidden属性。我敢打赌,会有类似的方法。试一试。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句