cancel
Showing results for 
Search instead for 
Did you mean: 

Showing The content type

mangar
Star Contributor
Star Contributor
How do I show the content type in the properties list? I have my top level content type like this:
<type name="my:doc">
<title>My Document</title>
<parent>cm:content</parent>
</type>

and a sub types:

<type name="my:marketingDoc">
<title>My Marketing Document</title>
<parent>my:doc</parent>
</type>

<type name="my:hrDoc">
<title>My HR Document</title>
<parent>my:doc</parent>
</type>

I did everything right on the content wizard, my drop down is there and everything is fine but how do i KNOW that is is the proper type? I add this to my web-client:

<config evaluator="node-type" condition="my:doc">
<property-sheet>
  <show-property name="type" display-label-id="TYPE"/>
</property-sheet>
</config>

Nothing. Smiley Sad

I have tried every thing I could think of in the name but to no avail. I can't even get the TYPE label to sow up.  I can add a real "property" and show that (in fact the aspects are showing up fine) but to add a property just to show the doc type seems redundant and silly.

Thank you
6 REPLIES 6

armedia
Champ in-the-making
Champ in-the-making
1. First define the attribute "type" to the custom document you have created using the below code:

<config evaluator="node-type" condition="my:doc">
   <property-sheet>
      <show-property name="my:type" show-in-edit-mode="true" show-in-view-mode="true"/>
   </property-sheet>
</config>

Hope this helps your need.

mangar
Star Contributor
Star Contributor
I added this to my web-content:

<config evaluator="node-type" condition="my:doc">
  <property-sheet>
    <show-property name="my:doc" show-in-edit-mode="true" show-in-view-mode="true"/>
   </property-sheet>
</config>

hoping it would show the type for all documents, alas no. I also tried name="my:hrDoc" (I would think that would show the type only if it was a my:hrDoc) But nothing showed up.

What am i missing?

armedia
Champ in-the-making
Champ in-the-making
Have you defined the attribute 'my:type" in your custom model file.

This part of the code is missing in your custom model file.

<type name="my:my_doc">
   <title>My doc</title>
   <parent>cm:content</parent>
   <properties>
      <property name="my:type">
         <title>Document Type</title>
         <type>d:text</type>
         <mandatory>false</mandatory>             
      </property>   
   </properties>
</type>

mangar
Star Contributor
Star Contributor
Ahh, ok. So I have to add a property "type" to each of my content types. That seems redundant. as all I want is the <title></title>   in my <type name="my:doc"> content definition. Is there a way to access something like "my:doc.title"

Meanwhile, thank you for the help and I will add that property to my content types.

armedia
Champ in-the-making
Champ in-the-making
The <title> tag is optional in the contentmodel file. You can use it either in the contentmodel or the webclient custom file or both. The preference would be to the title tag in webclient custom file would be displayed if there is one specified.

mangar
Star Contributor
Star Contributor
The preference would be to the title tag in webclient custom file would be displayed if there is one specified.

Yes. And how would I do that?  Smiley Very Happy