Hi all,

This definitely seems to be a good idea for several occasions.
I'd like to re-use this idea for defining locales, and using them to
determine the locale for content items.
But how can I restrict the type of a reference in the cnd file?

Thanks,
Marcel

On 11/16/06, Jukka Zitting <[EMAIL PROTECTED]> wrote:

Hi,

On 11/16/06, Stefan Guggisberg <[EMAIL PROTECTED]> wrote:
> you could e.g. create a node type myapp:Category that extends from
> mix:referenceable. now for each category (e.g. book, dvd, etc) you can
> create a node of type myapp:Category.
>
> in your custom node types make your "category" property a REFERENCE
> property and restrict it to myapp:Category.
>
> you can add new categories (nodes of type myapp:Category) at any time.

This is one of my favourite JCR patterns. Not only it gives you nice
and controlled extensibility, it allows you to easily attach whatever
information to the category nodes *and* gives you a blazing-fast
mechanism to list all nodes that link to a given category.

BR,

Jukka Zitting

Reply via email to