Forums / General / A question about classes and attributes.

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 !!!!

eZ debug

Timing: Jan 18 2025 04:56:48
Script start
Timing: Jan 18 2025 04:56:48
Module start 'content'
Timing: Jan 18 2025 04:56:49
Module end 'content'
Timing: Jan 18 2025 04:56:49
Script end

Main resources:

Total runtime1.5020 sec
Peak memory usage4,096.0000 KB
Database Queries204

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 587.7266180.8438
Module start 'content' 0.00551.3365 768.5703648.0391
Module end 'content' 1.34190.1600 1,416.6094337.0781
Script end 1.5020  1,753.6875 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.2694210.0002
Check MTime0.00150.0981210.0001
Mysql Total
Database connection0.00070.043410.0007
Mysqli_queries1.403693.44722040.0069
Looping result0.00210.13822020.0000
Template Total1.470097.920.7350
Template load0.00230.152020.0011
Template processing1.467597.698720.7337
Template load and register function0.00020.013110.0002
states
state_id_array0.00130.087110.0013
state_identifier_array0.00130.088520.0007
Override
Cache load0.00210.1409270.0001
Sytem overhead
Fetch class attribute can translate value0.00140.094150.0003
Fetch class attribute name0.00240.157280.0003
XML
Image XML parsing0.00460.308650.0009
class_abstraction
Instantiating content class attribute0.00000.001190.0000
General
dbfile0.00630.4163400.0002
String conversion0.00000.000530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 16
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs