Working with the Autonomous AIM Flag

Release 1.0 - ...

When code is executed in translations or rendertemplates, the source item for outgoing AIM references is normally set to the rendered item. This design is fine when the relations are contextually defined, such as with default usage of XLinks, Siblings, Parent, Sitemap, etc..., since the references added by these macros depend on the context of the rendered item.

Now, let's say we use a Sitemap macro defined in some ELBA element to generate a (cached) dynamic menubar in a site.

Smartsite SXML CopyCode image Copy Code
<div class="autoExpandMenu">
 <se:sitemap startitem="home" maxlevels="2" />
</div>

In this case, the sitemap will be rendered during rendering of any item using the system translation. This would potentially result in large numbers of outgoing ItemToFolder relations from all these items, which is definitely not a desired situation.

There is, however, a way to tell AIM that the actual source item of the declaring elements, thus, the System Translation itself, should be the source of the outgoing relations: the Autonomous flag:

Smartsite SXML CopyCode image Copy Code
<div class="autoExpandMenu">
 <se:sitemap startitem="home" maxlevels="2" aim="Internal,Autonomous" />
</div>

The result is that AIM will administer the relations as outgoing from the Translation only. Apart from the performance gain, it will help tremendously in getting a clear overview of a site's interdependencies.