[Hippo-cms7-user] Identifying same-name child-nodes of a document
t.jeger at onehippo.com
Wed Dec 5 10:48:48 CET 2012
I am working on a project which defines a document type with a resource
(e.g. hippo:resource) which can be "multiple".
If I create multiple resources, their respective child nodes in the
repository will all have the same name (but different content).
In my project's site, a resource container has been setup which, during the
rendering of a link to download a certain resource,
creates a URL that uniquely identifies the resource by stripping the node
name off the node's path, and replacing it with a
unique attribute of the resource, such as its filename. When the resource
is requested (downloaded), that URL needs to be
translated back to the correct instance (node) in order to retrieve the
content. This is currently supported by the resource
container looking for the resource with the matching filename.
Now, I also have to support the situation where my document has a
"multiple" compound, which in turn contains a resource
(or even a "multiple" resource). This means that homonymous (same name)
child nodes exist at arbitrary locations in the URL,
and there may be even multiple homonymous parts. The way to map a node to a
URL and back described above fails for this
I expect that this problem has been tackled before. Is there a best
practice? Do I have to start using the resource's UUID as part
of the URL in order to avoid the path jeopardy? Should I be indexing the
homonymous nodes, like ".../mydoc/resource-3/filename.ext"?
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142
US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Hippo-cms7-user