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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 19 2025 00:17:52
Script start
Timing: Jan 19 2025 00:17:52
Module start 'layout'
Timing: Jan 19 2025 00:17:52
Module start 'content'
Timing: Jan 19 2025 00:17:53
Module end 'content'
Timing: Jan 19 2025 00:17:53
Script end

Main resources:

Total runtime0.6973 sec
Peak memory usage4,096.0000 KB
Database Queries63

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0073 587.9375152.6250
Module start 'layout' 0.00730.0039 740.562539.4453
Module start 'content' 0.01120.6847 780.0078573.4531
Module end 'content' 0.69590.0014 1,353.460916.1563
Script end 0.6973  1,369.6172 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.4314160.0002
Check MTime0.00120.1775160.0001
Mysql Total
Database connection0.00060.089710.0006
Mysqli_queries0.637491.4083630.0101
Looping result0.00060.0790610.0000
Template Total0.663595.120.3317
Template load0.00200.286020.0010
Template processing0.661594.858820.3307
Template load and register function0.00010.013210.0001
states
state_id_array0.00090.124010.0009
state_identifier_array0.00140.204520.0007
Override
Cache load0.00170.2450380.0000
Sytem overhead
Fetch class attribute can translate value0.00060.088920.0003
Fetch class attribute name0.00080.114970.0001
XML
Image XML parsing0.00100.146320.0005
class_abstraction
Instantiating content class attribute0.00000.0028100.0000
General
dbfile0.00090.1359230.0000
String conversion0.00000.001740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 24
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs