A question about classes and attributes.

Author Message

Alejandro Dominguez

Thursday 16 December 2010 3:07:55 am

Hi folks,

I would to include an Image Gallery and a Video Gallery into a content Class. This class is the description of a museum item (name,date, images, video, etc).

I have created a Video Gallery and I would like every item can have their own video gallery. I thought I could add this with an attribute but it doesn't appear.

Sorry if this is a noob question :$

André R.

Thursday 16 December 2010 4:07:55 am

The way you do this in eZ Publish is normally to make museum container and setup policy's to allow creation of galleries witin museum, and images within galleries and so on.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Nicolas Pastorino

Thursday 16 December 2010 4:21:55 am

Hi Alejandro,

First off, are you using eZ Publish Fuji (4.4) ? Did you choose the eZ Flow package when running the installation wizard ? Having it installed provides a bunch of handy default templates. Ond of doing it, at the content class level, is to add an "Object Relation" attribute, named "Media Gallery" for instance. When editing an article, and having created a media gallery container beforehand, one can establish the link between the article and its media gallery. You then need to adjust the display template for the article class, so that the new attribute is properly displayed, potentially showing a carousel of all media assets in a sexy way.

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

Carlos Revillo

Thursday 16 December 2010 5:57:28 am

Another option could be use object relation list datatype (also provided by eZ Publish) or an extension called objectrelationbrowse

You can add then a field for images and another one for videos, and adding them to the museum while you're editing it.

Cheers.

Alejandro Dominguez

Friday 17 December 2010 4:17:37 am

Hi guys,

First of all THANK YOU for your quick reply!

Nicolas I have been trying your method and I find a "usabilty" problem. It should be useful to create the gallery directly from the museum item. It would be difficult to explain my client this. But it's a possible solution.

Carlos I have install objectrelationbrowse but when I'm creating a museum item the objectrelationbrowse attribute only display the name. it hasn't appeared any button, textbox, etc. I have check the screenshots and the info in the project site but I'm no sure if I can create the video gallery directly from the museum item or if I have to create this object before. any ideas?

Thanks !!!!

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 11:15:41
Script start
Timing: Jan 18 2025 11:15:41
Module start 'layout'
Timing: Jan 18 2025 11:15:41
Module start 'content'
Timing: Jan 18 2025 11:15:42
Module end 'content'
Timing: Jan 18 2025 11:15:42
Script end

Main resources:

Total runtime0.7062 sec
Peak memory usage4,096.0000 KB
Database Queries67

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 589.1250152.6250
Module start 'layout' 0.00560.0030 741.750039.4531
Module start 'content' 0.00870.6960 781.2031642.9609
Module end 'content' 0.70470.0014 1,424.164116.1406
Script end 0.7061  1,440.3047 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.4782160.0002
Check MTime0.00140.2007160.0001
Mysql Total
Database connection0.00120.163710.0012
Mysqli_queries0.639490.5401670.0095
Looping result0.00100.1467650.0000
Template Total0.674795.520.3374
Template load0.00260.374720.0013
Template processing0.672195.171920.3360
Template load and register function0.00010.013910.0001
states
state_id_array0.00110.155210.0011
state_identifier_array0.00130.190620.0007
Override
Cache load0.00220.3111270.0001
Sytem overhead
Fetch class attribute can translate value0.00090.130440.0002
Fetch class attribute name0.00190.262580.0002
XML
Image XML parsing0.00220.315940.0006
class_abstraction
Instantiating content class attribute0.00000.005890.0000
General
dbfile0.00230.3222290.0001
String conversion0.00000.001140.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
4content/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
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 16
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs