cancel
Showing results for 
Search instead for 
Did you mean: 

'Change Types' options menu labeleds

tremal
Champ in-the-making
Champ in-the-making
Hi,

I've created a new model and finally at my share-config-custom.xml I've added the next code

<config evaluator="string-compare" condition="DocumentLibrary">
  <types>
    <type name="cm:content">
      <subtype name="so:song" />
    </type>

    <type name="cm:folder">
    </type>
  </types>
</config>

But when I log into Share and try change the type the option appears like type.so_song

Where is the file where I can specify that this option must be translated to Song for example.

I'm tried in "webclient.properties" and "songModelResourceBundle.properties"

I'm using Alfresco 3.4.0d CE

Thnaks
13 REPLIES 13

fstnboy
Champ on-the-rise
Champ on-the-rise
Don't know which application server you're using, if tomcat rename the provided custom-slingshot-application-context.xml.sample to custom-slingshot-application-context.xml and add the following:


<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>
  
   <bean id="my.resources" class="org.springframework.extensions.surf.util.ResourceBundleBootstrapComponent">
      <property name="resourceBundles">
         <list>
            <value>alfresco.messages.<resources_name></value>
         </list>
      </property>
   </bean>

</beans>


Once you've done that, you'll need to create the <resources_name>.properties file in shared/classes/alfresco/messages with the values you want.

Hope this helps.

Adei

tremal
Champ in-the-making
Champ in-the-making
Yes, it's works so fine! Thank you!

bhavana
Champ in-the-making
Champ in-the-making
Hi

the posts are usefull but i had one doubt that is i have added a new option in the dropdown for my custom type which works fine. now when i change the document type to my custom type i want some metadata data to get associated with that document.

Thank you in advance..!!!

fstnboy
Champ on-the-rise
Champ on-the-rise
Hi bhavana,

For more detailed info you can check the following URL (http://wiki.alfresco.com/wiki/Forms). But what you basically need is update your share-config-custom.xml with:


<config evaluator="node-type" condition="my:type">
      <forms>
         <form>
            <field-visibility>
               <show id="my:property1" />
               <show id="my:property2" force="true" />
               <show id="my:property3" force="true" />
               
               <!– you can add aspect properties as well–>
                                        <!– ie: cm:emailed aspect properties–>
               <show id="cm:originator" />
               <show id="cm:addressee" />
               <show id="cm:addressees" />
               <show id="cm:sentdate" />
               <show id="cm:subjectline" />
            </field-visibility>
            <appearance>
                                        <set id="my-properties" appearance="bordered-panel" label="My Properties" />
               <field id="my:property1" read-only="true" set="my-properties"/>
               <field id="my:property2" read-only="true" set="my-properties"/>
               …
                                        <!– Adding a control to render the property –>
               <field id="my:property3" set="my-properties">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
               </field>
                                        <field id="cm:originator" read-only="true" />
               <field id="cm:addressee" read-only="true" />
               <field id="cm:addressees" read-only="true" />
               <field id="cm:sentdate" read-only="true" />
               <field id="cm:subjectline" read-only="true" />
            </appearance>
         </form>
      </forms>
   </config>


The set will group all the properties with the same set value in a panel

Note that it won't inherit the properties from the cm:content, so this wouldn't show cm:name, cm:title, etc… you'll need to add them to that configuration.

Hope this helps, if so please vote this as a useful post.

Regards,
Adei

bhavana
Champ in-the-making
Champ in-the-making
Hey Thanks for the reply…


I just checked the way you told that is also useful but i tried in a bit different manner which works absolutely fine …

fstnboy
Champ on-the-rise
Champ on-the-rise
Glad to know it…

Could you give me a point if I was helpful? Thanks!

marcoq82
Champ in-the-making
Champ in-the-making
I'm facing the same problem.

I have understand which are the steps i have to perform to change the labels in the Change Type dialog but, unfortunately, I haven't understand which is the format i should use to specify the label in the .properties file. I have made some searches on the Internet but nothing was helpful.

In the case we have a type so:song (as the example above), what is the right record i have to write in the .properties file in order to read the label in the Change Type Dialog? Can anyone help?

Thanks.

minnie
Champ in-the-making
Champ in-the-making
Hi MarcoQ82!
If you add a new custom type so:song, che solution to have the correct corresponding label shown in your Change Type dropdown menu is to add a new row type.so_song=My Song Type    in the slingshot.properties file, or that related to your language.
Bye

marcoq82
Champ in-the-making
Champ in-the-making
Thank you minnie,
even if I can test the solution as i have changed work and i'm not developing on Alfresco anymore (unfortunately), i will remember it for the next time!