Thursday 14 January 2010 11:38:11 pm
Hi Nicolas,
The usual way of restricting the list of allowed content classes for creation at a given location in the tree is to use the access control system. The content | create policy accepts such limitations. But your case seems to be more of a functional use case than a security question, and the method exposed above might not be suitable. A possible solution would be to build this drop down by hand, in the template you are using for this. I would advise to always verify the list you are building against the authorized one, for security reasons. The latter is available in a node template as follows:
$node.object.can_create_class_list which takes into account the currently logged in user and the context (location, type of object viewed, section number, ...). You could then further filter this variable. Hope that helps, cheers!
--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board
eZ Publish Community on twitter: http://twitter.com/ezcommunity
t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye
|