AnsweredAssumed Answered

4.0 Reusing existing Alfresco components for a customization

Question asked by loftux Moderator on Sep 26, 2011
Latest reply on Dec 27, 2016 by douglascrp
I've read David Drapers excellent posts on the new extensibility features coming in 4.0.
There is one scenario I cannot figure out how to do. I want to reuse existing components, one could be to implement the categories tree in Site documentlibrary, my particular test case was to add the preview to the edit-metadata page.
What I did was
-added site-data/extension/edit-metadata-preview.xml with content
<extension>
   <modules>
      <module>
         <id>Edit Metadata with Preview</id>
         <description>Adding document preview to edit metadata page</description>
         <customizations>
            <customization>
               <targetPackageRoot>org.alfresco</targetPackageRoot>
               <sourcePackageRoot>se.loftux</sourcePackageRoot>
            </customization>
         </customizations>
         <components>
            <component>
               <region-id>metadata-web-preview</region-id>
               <source-id>edit-metadata</source-id>
               <scope>template</scope>
               <sub-components>
                  <sub-component id="metadatapreview" index="25">
                     <url>/components/preview/web-preview</url>
                     <properties>
                        <nodeRef>{nodeRef}</nodeRef>
                     </properties>
                  </sub-component>
               </sub-components>
            </component>
         </components>
      </module>
   </modules>
</extension>
- added templates/se/loftux/edit-metadata.ftl with content
<@region id="metadata-web-preview" target="edit-metadata" action="after" scope="template" />
-deployed the extension module.

The customization ftl is picked up, but what I get when rendering is: <div id="unbound-region-metadata-web-preview">
So something is wrong with my component declaration. What am I missing?

Outcomes