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