Picking up new stuff rather quickly now.

It seems I start to understand Alfresco. I can make custom actions, nice action buttons, run Javascripts (inside & outside alfresco) without errors. I can adress spaces & nodes and access their parameters now.

So level up !!!

We now need to find nodes & space within the repository without looking for names. So I created aspect like

– isCollection
– isHidden
– isConfigFile

Based on a location X where I start my script (see previous post how to get that location and context in a Javasscript) I want to find a Space somewhere higher up the tree. And where “before” i searched for a name of a space, i now search for an .hasAspect(“namespace_x:isHidden”) and if that’s true I do my stuff.

EXAMPLE:

in ContentModel.xml adding aspects like this:

<aspect name=”mjb:isPlanning”>
<title>(MJB)isPlanning</title>
<properties>
<property name=”mjb:isPlanning”>
<title>MJB Planning</title>
<type>d:boolean</type>
<default>true</default>
</property>
</properties>
<associations>
<association name=”mjb:isPlannable”>
<title>Planning Space</title>
<source>
<mandatory>false</mandatory>
<many>true</many>
</source>
<target>
<class>cm:folder</class>
<mandatory>false</mandatory>
<many>false</many>
</target>
</association>
</associations>
</aspect>

Advertenties

Geef een reactie

Vul je gegevens in of klik op een icoon om in te loggen.

WordPress.com logo

Je reageert onder je WordPress.com account. Log uit / Bijwerken )

Twitter-afbeelding

Je reageert onder je Twitter account. Log uit / Bijwerken )

Facebook foto

Je reageert onder je Facebook account. Log uit / Bijwerken )

Google+ photo

Je reageert onder je Google+ account. Log uit / Bijwerken )

Verbinden met %s