Documentation
DUPLICATE
usage
<DUPLICATE>
<element [ID="n"]>
[<WHERE>
...criterias for the elements to duplicate
</WHERE>]
...updates to make in the copy...
</element>
</DUPLICATE>
parameters
ID of the element to duplicate, or criterias allowing to know which elements to duplicate
returns
<MESSAGE elementID=""/>
Duplicate a whole tree of Nectil elements
Duplicate every element in a tree of Nectil elements to make an exact copy of this tree.
All descendants are copied but the element is not copied in any of its parents, because the operation strongly depends on the context : often you don't want the copy to appear in every parent of the original element.
But you can use a reverse dependency to add the element in the parent you want.
examples
<DUPLICATE>
<MEDIA ID="804"/>
</DUPLICATE>
Duplicate the media with ID=804 to make an exact copy of it.
<DUPLICATE>
<MEDIA>
<WHERE>
<INFO>
<DENOMINATION operator="=">My Website</DENOMINATION>
</INFO>
</WHERE>
</MEDIA>
</DUPLICATE>
Duplicate the media which denomination is "My Website".
<DUPLICATE>
<MEDIA ID="804">
<INFO>
<DENOMINATION>My Website 2</DENOMINATION>
</INFO>
</MEDIA>
</DUPLICATE>
Duplicate the media with ID=804 and update the copy's denomination to "MyWebsite 2".
<DUPLICATE>
<MEDIA>
<WHERE>
<INFO>
<DENOMINATION operator="=">My Website</DENOMINATION>
</INFO>
</WHERE>
<INFO>
<DENOMINATION>My Website 2</DENOMINATION>
</INFO>
</MEDIA>
</DUPLICATE>
Duplicate the media with denomination "My Website" and update the copy's denomination to "MyWebsite 2".
<DUPLICATE>
<MEDIA ID="25">
<DEPENDENCIES>
<DEPENDENCY type="mediaNavigation" mode="reverse"><MEDIA ID="3"/></DEPENDENCY>
</DEPENDENCIES>
</MEDIA>
</DUPLICATE>
Duplicate the media with ID=25 and add the copy in the dependencies of the Media with ID=3.