cancel
Showing results for 
Search instead for 
Did you mean: 

Web form as a custom content type

preetigupta
Champ in-the-making
Champ in-the-making
Hi,
I have to capture some metadata for every web form created. For that I would have to create a custom content type. I have created a custom type and done the configuration in web-client-config-custom.xml. I can see the new custom content type in the drop down when I create a web form. But I cannot see the associated properties with that content type.

Is there any other configuration I need to do to achieve the same.

Thanks and Regards
Preeti Gupta
3 REPLIES 3

openpj
Elite Collaborator
Elite Collaborator
You have to configure the property sheet section in the same configuration file that you have just edited, in this way:
http://wiki.alfresco.com/wiki/Web_Client_Model_Configuration_Guide_1.2#Content_Type_Properties_in_th...
Hope this helps.

preetigupta
Champ in-the-making
Champ in-the-making
Hi,

Thanks for the reply. I think I have done what you have suggested. Though not sure. Please take a look and let me know, what I am missing.

My Model File
<?xml version="1.0" encoding="UTF-8"?>
<!– Definition of new Model –>
<model name="sc:somecomodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">

   <!– Optional meta-data about the model –>
   <description>Someco Model</description>
   <author>Optaros</author>
   <version>1.0</version>

   <!– Imports are required to allow references to definitions in other models –>
   <imports>
      <!– Import Alfresco Dictionary Definitions –>
      <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
      <!– Import Alfresco Content Domain Model Definitions –>
      <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" />
      <import uri="http://www.alfresco.org/model/system/1.0" prefix="sys" />
      <import uri="http://www.alfresco.org/model/wcmmodel/1.0" prefix="wcm"/>
   </imports>

   <!– Introduction of new namespaces defined by this model –>
   <namespaces>
      <namespace uri="http://www.someco.com/model/content/1.0" prefix="sc" />
   </namespaces>

   <constraints>
      <constraint name="sc:campaignList" type="LIST">
            <parameter name="allowedValues">
                <list>
                    <value>Application Syndication</value>
               <value>Private Event Retailing</value>
                    <value>Social Shopping</value>
                </list>
            </parameter>
        </constraint>
   </constraints>
   <types>
      <type name="sc:wcmdoc">
         <title>Someco WCM Document</title>
         <parent>wcm:avmplaincontent</parent>
         <properties>
            <property name="sc:wcmcampaign">
               <type>d:text</type>
               <multiple>true</multiple>
               <constraints>
                  <constraint ref="sc:campaignList" />
               </constraints>
            </property>
         </properties>
      </type>
   </types>
</model>

web-client-config-custom.xml

<alfresco-config>
   <config evaluator="string-compare" condition="Content Wizards">
      <content-types>
         <type name="sc:wcmdoc" />
      </content-types>
  </config>
<config evaluator="node-type" condition="sc:wcmdoc">
      <property-sheet>       
         <show-property name="sc:wcmcampaign" display-label-id="Campaign"
                        ignore-if-missing="false" />        
      </property-sheet>
   </config>
</alfresco-config>

Now when I create a web form in web project in WCM, I can see my custom type in drop down but I dont see the property on the property sheet.

Thanks and Regards
Preeti Gupta

preetigupta
Champ in-the-making
Champ in-the-making
Hi

Is there any input on the query?

Thanks and Regards
Preeti Gupta