Question

I have made a custom aspect stores the information I need... But I can't figure out how to add it to a folder so that when an user uploads a document they need to enter the meta-data for that document.

My custom aspect doesn't show up in the Manage Aspects dialog from the repository or while creating a new rule for a folder.

I can see it if I choose the 'set property' option when creating a rule, but then I can only set a single property at a time and only with data defined in the rule.

I have added my aspect to the 'web-client-config-custom.xml' as follows:

   <config evaluator="string-compare" condition="Action Wizards">
      <aspects>
         <aspect name="custom:MyAspect" />
      </aspects>
   </config>

   <!-- Displays the properties in view details page -->
   <config evaluator="aspect-name" condition="custom:MyAspect">
      <property-sheet>
         <separator name="sepMyAspect1" display-label="MyAspect" component-generator="HeaderSeparatorGenerator" />
         <show-property name="p1" />
         <show-property name="p2" />
         <show-property name="p3" />
         <show-property name="p4" />
         <show-property name="p5" />
         <show-property name="p6" />
      </property-sheet>
   </config>
</alfresco-config>

I can't help but think that I missed something in this .xml file. But I don't have enough experience with Alfresco to determine what it is.

EDIT:

I have tried to modify the content-model.properties.xml file, and that got at least something to show in the manage content aspects dialog... but it shows up oddly and if I add it to a folder the operation fails.

custom_customModel.description=User Defined Content Model

custom_customModel.aspect.custom_MyAspect.title=MyAspect
custom_customModel.aspect.custom_MyAspect.description=MyAspect Description
custom_customModel.property.custom_p1.title=p1
custom_customModel.property.custom_p1.description=p1 desc
custom_customModel.property.custom_p2.title=p2
custom_customModel.property.custom_p2.description=p2 desc
custom_customModel.property.custom_p3.title=p3
custom_customModel.property.custom_p3.description=p3 desc
custom_customModel.property.custom_p4.title=p4
custom_customModel.property.custom_p4.description=p4 desc
custom_customModel.property.custom_p5.title=p5
custom_customModel.property.custom_p5.description=p5 desc
custom_customModel.property.custom_p6.title=p6
custom_customModel.property.custom_p6.description=p6 desc

When I open the dialog I get:

aspect.custom=MyAspect

where the title should be... Like it's getting cut off early.

EDIT 2:

Well, I managed to get a little more progress in, it now shows up as:

aspect.custom_MyAspect

Also, I can now select it when making a rule for a folder. Turns out I used an '=' instead of a ':' in the share-config-custom.xml file.

However, I can't see the properties from my custom aspect. It seems to get added but I can't see then when I got to the properties form... Neither by using the Dialog or by creating a rule that adds the aspect to each new item...

Was it helpful?

Solution

Not sure whether that's what you want, but you configured both user interfaces, the old explorer (web-client-config-custom.xml) and share (share-config-custom.xml).

That said, have a look at https://wiki.alfresco.com/wiki/Forms#Types_and_Aspects.

Assuming you want your properties to appear on every form (in share) where the node has your aspect, the configuration (share-config-custom.xml) should look analogous to

<config evaluator="aspect" condition="fdk:exif">
   <forms>
      <form>
         <field-visibility>
            <show id="fdk:manufacturer" />
            <show id="fdk:originalDateTime" />
            <show id="fdk:compression" />
            <show id="fdk:xResolution" />
            <show id="fdk:yResolution" />
            <show id="fdk:flash" />
         </field-visibility>
      </form>
   </forms>
</config>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top