cancel
Showing results for 
Search instead for 
Did you mean: 

Problems using build in form control *.FTL's

lofving
Champ in-the-making
Champ in-the-making
Hi community.

I'm trying to config a custom data type that's a child of cm:content and thought that have access to properties like the mimetype (and others).
The problem I'm facing is that my mimetype field wont use the build in "mimetype.ftl" file that i want it to use.

<config  evaluator="node-type" condition="cdt:officialType">
      <forms>
         <form>
            <field-visibility>
               <show id="mimetype" />
            </field-visibility>
            <appearance>
               <field id="mimetype">
                  <control template="/org/alfresco/components/form/controls/mimetype.ftl" />
               </field>
            </appearance>
          </form>
                 </forms>
        </config>

Anyone know what I'm doing wrong here?

Thanks
//Lofving
2 REPLIES 2

mitpatoliya
Star Collaborator
Star Collaborator
If your custom content type is extending the default cm:content then you need not to set this explicitly.
It will automatically add that prop.

lofving
Champ in-the-making
Champ in-the-making
I have no idea what i just did to make it work but after about 5 restarts of the server something was changed and it works.

mitpatoliya: The code i provided is not all of it. I have a lot more Smiley Tongue
Since I don't want to show all cm:content properties i will have to use <show> tags on the ones I want to see. And without the <appearance> tag the content will not be shown correctly I'm afraid.

But since it works I'm happy!
Thanks anyway for your help
//Lofving