sub-content class

Author Message

Dries Samyn

Wednesday 19 May 2004 7:37:02 am

First of all, sory if this would be covered in the manual somewhere, I haven't been able to find it yet.

When setting up a content class, how is it possible to enable it to have "sub content". For example, when you create a "product", you can then add as mnany "product reviews" as you want. I can't seem to see how that is being enabled.

What I am trying to do is create a content type for a page that allows to have text and any amount of URLs (including title and descrption) at the bottom.

Hope this makes sense.

Thanks,
Dries.

Guglielmo Celata

Wednesday 19 May 2004 9:59:50 am

Hi Dries,
what I usually do, is to create a new class of content (in your case: <i>product review</i>) and create <i>product reviews</i> as children objects of the <i>product</i> object, using the <i>Create here</i> button in the admin interface.

That is, you don't impose the relation at a design level (i.e. when specifying classes), but at an implementation level (i.e. when creating objects).

It's questionable, but it works.

Remember, though, that you have to enforce a policy, so that the user you choose to authorize, can only create <i>product reviews</i> under a <i>product</i> object and nowhere else (it can be done in the <i>role</i> sub-section of the <i>user</i> section of the admin interface.

Sounds complicated, but it's absolutely not.

Bye,
Guglielmo

Dries Samyn

Thursday 20 May 2004 1:00:49 am

Guglielmo,

Thanks for the reply. I think I understand what you are saying. But how come some content objects (for example the ones of type "product") have a "create here" button, and others don't?
I'll explain better. For example, I would like to have subcontent for "article" objects (for a "related links" list for example), but if I create an ojbect of the type "article", I cannot see a "create here" button.

Thanks,

Dries.

Guglielmo Celata

Thursday 20 May 2004 3:55:23 am

Well, Dries,
the Article class is treated as an exception in the default administration interface. I don't know exactly why (I suppose it's a bug, but you'd better ask somebody in the crew).

You can very easily change this behaviour, anyway, by modifying the following file:

[ezRoot]/design/admin/override/templates/article.tpl

All you have to do is remove the comment around the

<div class="buttonblock">

block where the <i>create here</i> button lies.

Well ... that's what I've done :-)

Guglielmo

Dries Samyn

Thursday 20 May 2004 4:28:04 am

Thanks for the reply!
I suppose I could also add a new custom class based on article.

I'm pretty interested to hear what the reason behind it is though? Can anybody of the "crew" comment on this?

Cheers,

Dries.

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 18 2025 16:17:52
Script start
Timing: Jan 18 2025 16:17:52
Module start 'layout'
Timing: Jan 18 2025 16:17:52
Module start 'content'
Timing: Jan 18 2025 16:17:54
Module end 'content'
Timing: Jan 18 2025 16:17:54
Script end

Main resources:

Total runtime1.3961 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.0078 588.9141152.6094
Module start 'layout' 0.00780.0046 741.523439.4297
Module start 'content' 0.01241.3818 780.9531501.0938
Module end 'content' 1.39420.0018 1,282.046912.1875
Script end 1.3961  1,294.2344 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.2544160.0002
Check MTime0.00140.1002160.0001
Mysql Total
Database connection0.00120.086710.0012
Mysqli_queries1.334695.5927630.0212
Looping result0.00060.0426610.0000
Template Total1.346396.420.6731
Template load0.00230.164720.0011
Template processing1.344096.264720.6720
Template load and register function0.00020.012810.0002
states
state_id_array0.00240.168410.0024
state_identifier_array0.00250.176320.0012
Override
Cache load0.00170.1252410.0000
Sytem overhead
Fetch class attribute can translate value0.00070.050220.0004
Fetch class attribute name0.00140.100150.0003
XML
Image XML parsing0.00020.016820.0001
class_abstraction
Instantiating content class attribute0.00000.000950.0000
General
dbfile0.00060.0403100.0001
String conversion0.00000.000640.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/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 27
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs