"parag" wrote:
Can I replace an array or list with a node/ContentNode? I have got most of it working, except I am still copying the array and would like to use a reference instead.
That would be a good idea.
It may be worth noting that you can put anything you want in a ContentNode, by extending it and adding your own fields. That will give you access to all the content item properties of the ContentNode, in addition to any properties you want to add.
For example, I have a content list, which consists of a list of items that extend a ContentNode.
<?xml version="1.0" encoding="UTF-8"?>
<component name="ContentItem" extends="ContentNode">
<interface>
<field id="field1" type="string" />
<field id="field2" type="string" />
</interface>
</component>
<?xml version="1.0" encoding="UTF-8"?>
<component name="ContentList" extends="ContentItem">
<children>
<ContentItem field1="Item-1" field2="Field-2" TITLE="Title-1" URL="http://url.com/1" />
<ContentItem field1="Item-2" field2="Field-2" TITLE="Title-2" URL="http://url.com/2" />
</children>
</component>