AnsweredAssumed Answered

New page in share with form component and upload component

Question asked by need on Jan 31, 2012
Latest reply on Feb 1, 2012 by need
Hi all,

I understand how to reuse components in new pages created to extend share.

Now I do not understand something wrong, I do not define the components that appear in the file test-2-columns.xml.

You place the code for clarity and structure.

This is test-2-columns.xml locate in formproject -> config -> alfresco -> site-data -> pages in my ecplipse folder-project structure

<?xml version='1.0' encoding='UTF-8'?>
<page>
   <title>Test 2 columns</title>
   <description>Test 2 columns</description>
   <template-instance>2-columns</template-instance>
   <authentication>user</authentication>
   <components>

      <!– Top –>
      <component>
         <region-id>title</region-id>
         <url>/components/title/simple-title</url>
         <properties>
            <title>Gestione CV</title>
         </properties>
      </component>
     
      <!– Navigation –>
      <component>
         <region-id>navigation</region-id>
         <url>/components/navigation/collaboration-navigation</url>
      </component>
     
      <component>
         <region-id>toolbar</region-id>
         <url>/components/documentlibrary/toolbar</url>
      </component>
     
     <!– Left Column –>
      <component>
         <region-id>left-column</region-id>
         <sub-components>
            <sub-component id="first">
               <url>/components/form/echo</url>
               <properties>
                  <echo>LEFT FIRST</echo>
               </properties>
            </sub-component>
           
            <sub-component id="second">
               <region-id>edit-metadata</region-id>
               <source-id>edit-metadata</source-id>
               <url>/components/form</url>
               <properties>
                  <itemKind>node</itemKind>
                <itemId>cm:content</itemId>
                <mode>edit</mode>
                <submitType>json</submitType>
                <showCaption>true</showCaption>
                <showCancelButton>true</showCancelButton>
             </properties>
         </sub-component>
      </sub-components>
      </component>

      <!– Right Column –>
      <component>
         <region-id>right-column</region-id>
         <sub-components>
            <sub-component id="first">
               <url>/components/form/echo</url>
               <properties>
                  <echo>RIGHT FIRST</echo>
               </properties>
            </sub-component>
            <sub-component id="second">
               <region-id>upload</region-id>
                  <source-id>upload</source-id>
                  <url>/components/flash-upload</url>
            </sub-component>
      </sub-components>
      </component>

   </components>
</page>


this is 2-columns.ftl locate in formproject -> config -> alfresco -> templates -> org -> alfresco in my ecplipse folder-project structure

<#include "include/alfresco-template.ftl" />
<@templateHeader />

<@templateBody>
      <div id="alf-hd">
       <@region id="header" scope="global"/>
         <@region id="navigation" scope="template"/>
         <@region id="title" scope="page"/>
      </div>
  
      <div id="toolbar">
         <@region id="toolbar" scope="template"/>
      </div>
  
   <div id="bd">
      <div class="yui-g">
         <div class="yui-u first">
         <@region id="left-column" scope="page"/>
         </div>
         <div class="yui-u second">
         <@region id="edit-metadata" scope="template"/>
         </div>
         <div class="yui-u">
            <@region id="right-column" scope="page"/>
         </div>
         <div class="yui-u first">
            <@region id="upload" scope="template"/>
         </div>
      </div>
   </div>
</@>

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

Please help me, thanks a lot, i use alfresco share 4.0b.

I am making a new page with a data entry form and I would upload the component to load documents into PDF.

Outcomes