Non-Authenticated FreeMarker page in alfresco share

梦想的初衷 提交于 2019-12-22 18:02:52

问题


i have create a new page in alfresco share but the page cannot be displayed without login! how can i make this page enabled without login.

my file in "/alfresco/templates/blog/demo/custom-viewer.ftl".

and this file contains "custom-viewer.ftl":

<#include "include/alfresco-template.ftl" />
<@templateHeader>
   <@script type="text/javascript" src="${url.context}/res/modules/documentlibrary/doclib-actions.js" group="document-details"/>
   <@link rel="stylesheet" type="text/css" href="${url.context}/res/components/document-    details/document-details-panel.css" group="document-details"/>
   <@templateHtmlEditorAssets />
</@>

<@templateBody>
   <@region id="web-preview" scope="template"/>
</@>

<@templateFooter>

</@>

and the file in "/alfresco/site-data/pages/custom-viewer.xml".

and this file contains "custom-viewer.xml":

<?xml version='1.0' encoding='UTF-8'?>
<page>
   <title>Custom Viewer</title>
   <template-instance>custom-viewer</template-instance>
   <authentication>none</authentication>
</page>

the page is work correctly but i need it to work without login? any help please?!!


回答1:


The thing is probably not your page which needs login but the components it's including. I'm seeing component regioun web-preview, if this defaults to the default web-preview: site-webscripts\org\alfresco\components\preview\web-preview.get.desc.xml

Then this components needs authentication, there is no <authentication> tag, so it defaults to user.

If you delete that <@region....> tag, you'll see the page.



来源:https://stackoverflow.com/questions/18683087/non-authenticated-freemarker-page-in-alfresco-share

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!