Forums / Setup & design / Filtering classes within a class

Filtering classes within a class

Author Message

Nabil Alimi

Wednesday 08 June 2005 6:54:04 am

Hi,

I created a class "Rich article" which I set as container. In this one, i'd like to be able to add inside this one "paragraph" (an other class i created).
This part is done, but i'd like to restrict the content that the user can create within the rich article to "paragraph".

Can anyone help ?

My blog : http://www.starnab.com/ezpublish / http://www.starnab.com/ / http://www.assiki-consulting.com
eZ Publish Freelance developper. Feel free to contact me +33 674 367 057
nabil at assiki d0t fr

Paul Borgermans

Wednesday 08 June 2005 8:38:05 am

Look at the roles/policies: this is one of the supported restrictions.

hth

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Nabil Alimi

Wednesday 08 June 2005 9:43:53 am

Yes I've checked before but roles & policies seems to only deal with users. Or did I miss something ?
Or is this the only way ?
This means i'll have to modify roles for every modules for administrator for example ?

My blog : http://www.starnab.com/ezpublish / http://www.starnab.com/ / http://www.assiki-consulting.com
eZ Publish Freelance developper. Feel free to contact me +33 674 367 057
nabil at assiki d0t fr

Paul Borgermans

Wednesday 08 June 2005 9:56:40 am

Yes, you missed something:

You can add restrictions for the creation of "paragraphs" so they can only be created when the parent class is "rich article".

It is not in the current docs, but wandering around in the admin interface will reveal this.

Basically:

- Go to users -> roles
- add a new role
- create a new policy for module content
- click "allow limited"
- select function create
- click allow limited
- voila, now you can select your desired combination with the parent class set to "rich article" when creating a "paragraph"!

hth

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Nabil Alimi

Thursday 09 June 2005 1:52:00 am

Well I went this far in fact. But as it seemed to not be related to content only, i gave up.

But for example, if i want to apply this policy to administrators users, that means i'll have to change the default unlimited access they have ?
Cause i've tried and it seems that the new restrictive policy do not "override" the unlimited one.

My blog : http://www.starnab.com/ezpublish / http://www.starnab.com/ / http://www.assiki-consulting.com
eZ Publish Freelance developper. Feel free to contact me +33 674 367 057
nabil at assiki d0t fr