cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco Share Edit Metadata + Web Preview Document

johnnypix
Champ in-the-making
Champ in-the-making
Hi,

I'm sorry for my english. Is it possible to show in share, the edit metada form and the web document previewer,on the same page at the same time?
So that when I would fill in the document metadata, I could look on the document preview at the same time,
in order to read the data from the document, that I need to write in metadata form.
Is this possible and if it is, any suggestions how to do this?

I Use Alfresco 4.2c (bitnami Virtual Appliance)

I already have try the proposite solution here:
https://forums.alfresco.com/forum/developer-discussions/alfresco-share-development/edit-metadata-vie...

Always, my problem is the same, I modify these files as I read in the previous discussion:
- edit tomcat\webapps\share\WEB-INF\classes\alfresco\templates\org\alfresco\edit-metadata.ftl
- edit tomcat\webapps\share\WEB-INF\classes\alfresco\templates\org\alfresco\document-details.ftl
- edit tomcat\webapps\share\WEB-INF\classes\alfresco\site-data\template-instances\edit-metadata.xml

When I restart Tomcat, the log print this:

Template processing error: "Expression doclibType is undefined on line 18, column 9 in org/alfresco/document-details.ftl."

Expression doclibType is undefined on line 18, column 9 in org/alfresco/document-details.ftl.
The problematic instruction:
———-
==> if doclibType?starts_with("dod5015") [on line 18, column 4 in org/alfresco/document-details.ftl]
in user-directive templateHeader [on line 3, column 1 in org/alfresco/document-details.ftl]
———-

Java backtrace for programmers:
———-
freemarker.core.InvalidReferenceException: Expression doclibType is undefined on line 18, column 9 in org/alfresco/document-details.ftl




How can I import javascript file that contains "doclibType" variable?
Can you help me? I'm novice and I'm working to this problem from 4 days.

Thank you for your answers
4 REPLIES 4

ddraper
World-Class Innovator
World-Class Innovator
It looks like that "doclibType" attribute on the model is set up by the /Slingshot/config/alfresco/templates/org/alfresco/documentlibrary.deprecated.js file (which is imported into the page by the "/Slingshot/config/alfresco/templates/org/alfresco/documentlibrary.js" file (I'm looking at the latest code on the SVN repository, but this should be the same as 4.2c). The problem is that you're trying to apply a solution for an earlier version of Alfresco on the current version. You shouldn't necessarily need to use that "doclibType" attribute at all (hence the reason that it's been deprecated).

There is no reason why you shouldn't be able to have the edit metadata and preview on the same page though.

johnnypix
Champ in-the-making
Champ in-the-making
Thanks for your reply.
There is a simple way to obtain results?

Please Can you explain how I am able to have edit metadata and preview on the same page?

wimc
Champ in-the-making
Champ in-the-making
I just got it to work:
My edit-metadata.ftl looks like this now:

<blockcode>
<#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>
   <@markup id="alf-hd">
   <div id="alf-hd">
      <@region scope="global" id="share-header" chromeless="true"/>
   </div>
   </@>
   <@markup id="bd">
   <div id="bd">
      <div class="share-form">
         <@region id="edit-metadata-mgr" scope="template" />
         <#if (config.scoped['DocumentDetails']['document-details'].getChildValue('display-web-preview') == "true")>
         <@region id="web-preview" scope="template" protected=true />
      </#if>
         <@region id="edit-metadata" scope="template" />
        
      </div>
   </div>
   </@>
</@>

<@templateFooter>
   <@markup id="alf-ft">
   <div id="alf-ft">
      <@region id="footer" scope="global" />
   </div>
   </@>
</@>
</blockcode>

Using HEAD, I think 4.2.e?

sharifu
Confirmed Champ
Confirmed Champ
is it possible to have it display on the right side of the page and the form on the left side, so they are side by side?