Assemble items from list of GUID's

Hi I have a list of content item ID’s retrieved directly from the Rhythmyx Repository. Is there a tool to assemble an item using a snippet template by passing only the item ID?

Not easily.

To “assemble an item”, you need to have the revision, context, template, and siteid (and sometimes folderid).

Assuming that you are starting from with an existing item, you can clone the existing Assembly Item ($sys.assemblyItem) and replace the parts you need with the values you have. This is what the #node_slot macro does, and you can look at it for further pointers.

If all you have is the content id (and not the node), then you’ll probably have to write a Java function to use the GuidManager service to find the GUID and then the Content Manager server to find the Node by GUID.

One other approach you can try is passing the list of ids to a JCR Query in an AutoSlot. This approach only works within a “slot”, but it’s more automated than the raw Node approach. It also doesn’t require writing any Java functions.

I hope this helps

Dave

Hi dave passing the list to an auto slot query sounds like a possible solution but I am not sure how I get the query to process the whole list?

you have to pass in a query that looks like this:

select rx:sys_title from nt:base where rx:sys_contentid = 713 or rx:sys_contentid = 701

You can build this query in a “foreach” loop in the bindings