cancel
Showing results for 
Search instead for 
Did you mean: 

More than one condition to display metadatas

christophes
Champ in-the-making
Champ in-the-making
Hi,

I'd like to know if there is a way to have many conditions in web-client-config-custom.xml to display metadatas. For example :
<config evaluator="aspect-name" condition="my:aspect1" condition2="my:aspect2">
      <property-sheet>
         …
      </property-sheet>
   </config>
in place of :
<config evaluator="aspect-name" condition="my:aspect1">
      <property-sheet>
         …
      </property-sheet>
   </config>
The aim of that would be to have a different display for metadatas when I have aspect1 AND aspect2.

I hope my question is clear.

Thanks,

Christophe
2 REPLIES 2

gavinc
Champ in-the-making
Champ in-the-making
Your question is clear. The answer is no, not out of the box.

However, you can implement custom evaluators, you register the evaluator in the config file and then reference it by name. The condition string will be passed to your evaluator so you can then test what you like.

For an example see the AspectEvaluator or NodeTypeEvaluator classes, also see web-client-config.xml for an example of how to register your evaluator.

So for example you could have:

<config evaluator="your-evaluator" condition="my:aspect1, my:aspect2">


Your evaluator could then check that all the aspects in the list are applied.

Hope this helps.

christophes
Champ in-the-making
Champ in-the-making
Thank you for your answer.

I'll have a look to these files.