cancel
Showing results for 
Search instead for 
Did you mean: 

customizing edit-content-properties for a content type

alpha
Champ in-the-making
Champ in-the-making
hi there,

i have customized edit-content-properties.jsp to display some computed fields. Now i want to display this jsp only for a specific content type so i use the dispatch mechanism with code

<config evaluator="node-type" condition="my:toto">
     <navigation>
         <override from-view-id="/jsp/content/edit-content-properties.jsp" to-view-id="/jsp/extension/edit-content-properties.jsp" />
      </navigation>
</config>

but it's not working :?
if i override the editContentProperties dialog  (in my web-client-custom-config.xml), by changing the location of the jsp thathas to be displayed, it works fine.
But by doing this, all my content will be displayed with this jsp in edit mode.

Can someone tell me how to set up well this dispatch mechanism.

Thanks
2 REPLIES 2

nuga
Champ in-the-making
Champ in-the-making
I would suggest
creating an action that is triggered off your specific content type.
for example:
My action is triggered off the document browse menu.  the evaluator i use jjust overrides teh "evaluate' method and determines the type of content it is


<actions>
         <!– Launch Add Aspect Dialog –>
         <action id="add_region">
            <label>Add Region</label>
            <image>/images/icons/add.gif</image>
         <action-listener>#{BrowseBean.setupContentAction}</action-listener>
                <action>wizard:addRegion</action>
               
            <evaluator>com.nkics.fmc.alfresco.ext.action.evalutator.AddRegionEvaluator</evaluator>

            <params>
               <param name="id">#{actionContext.id}</param>
            </params>
         </action>
        
         <!– Add action to more actions menu for each space –>
         <action-group id="document_browse_menu">
            <action idref="add_region" />
         </action-group>
      </actions>

gavinc
Champ in-the-making
Champ in-the-making
The default "editContentProperties" dialog lives within the global config section i.e. it's not restricted by type. To use a different "editContentProperties" dialog for a particular type do the following:

<config evaluator="node-type" condition="my:toto">
   <dialogs>
      <dialog name="editContentProperties"
                  page="/jsp/extension/edit-content-properties.jsp"
                  managed-bean="EditContentPropertiesDialog"
                  icon="/images/icons/edit_properties_large.gif"
                  title-id="modify_content_properties"
                  description-id="edit_content_description" />
   </dialogs>
</config>

This should use the custom version for your type only and the default one for every other type.