cancel
Showing results for 
Search instead for 
Did you mean: 

change type for content in wcmqs root folder

ranj
Champ on-the-rise
Champ on-the-rise
hi,
I created a content in (Sites->wcmqs->documentlibrary->wcmqs->webquickstart editorial->root).
after creating when i click on change type option, nothing is listed down. Which means i could not change the default ws:article type.

I have created model types and the change type works perfectly in the other places. but not inside wcmqs.How to change type for contents in wcmqs root folder?

Need help with this.

Thanks in advance,
ranj
2 REPLIES 2

jordiv
Champ on-the-rise
Champ on-the-rise
Hi Ranj,

If I'm not mistaken, you can't change the type of an Alfresco node. You can only specialize a type. So if your node's type is ws:article, you must define a custom content type which parent is ws:article.

Take a look at your model definition, mabe you have something like:

<type name="my:whatever">
            <title>Whatever</title>
            <parent>cm:content</parent>

            […]
You should define a custom type with <parent>ws:article</parent>

If you just want to add some custom metadata, you can consider using Aspects.


Cheers,
Jordi

ranj
Champ on-the-rise
Champ on-the-rise
Hi Jordiv,
Thanks for the reply.
Now i am able to change type for contents inside wcmqs root. The change type lists down the custom types having ws:article as parent. Smiley Happy
and also we need to add something like this in share-config-custom.xml.
<config evaluator="string-compare" condition="DocumentLibrary" replace="true">
   <createContent>
      <content mimetype="text/plain" icon="plain-text" label="menu.create-content.text" itemid="ws:article"/>
      <content mimetype="text/html" icon="html" label="menu.create-content.html" itemid="ws:article"/>
      <content mimetype="text/xml" icon="xml" label="menu.create-content.xml" itemid="ws:article"/>
      <content id="ws" mimetype="text/xml" icon="xml" label="ws" itemid="ws:employ"/>
      <content id="my" mimetype="text/xml" icon="xml" label="ws" itemid="my:sop"/>
    </createContent>
   <types>
         <type name="cm:content">
                <subtype name="ws:employ" />
         </type>
           <type name="ws:article">
           <subtype name="my:sop" />
         </type>         
    </types>
</config>

Regards,
Ranj