Class management

Author Message

Francis Poézévara

Tuesday 17 July 2007 8:17:35 am

Hello

I have a problem with the class management, and actually I don't know how to do what I want to do :D

I want to show on a webpage the content of "affairs". An "affair" has the following attribute : a project manager name and an unique affair name. Each affair can be composed of many "lots", which have the following attributes : date, number of components.

So for each affair, I want to show the project manager name, the affair name, and the attributes of all the lots of this affair...

I first tried to make a class Affair, with all the attributes, but the problem is that we don't know how many lots will be in an affair... So the best is to make two classes, one "affair" and one "lots". But how can I associate one affair with some lots, and print all the details on the page please ?

Thanks !

Heath

Tuesday 17 July 2007 11:49:25 am

Hello Francis,

Why not add an object relation (one or many separate content object associations within the single attribute) to your affair class?

This should allow you to simply add or remove lots from the content object's object relation list (lots attribute of the affair class) as you create and manage per content object (affair).

http://ez.no/doc/ez_publish/technical_manual/3_9/reference/datatypes/object_relation
http://ez.no/doc/content/advancedsearch?SearchText=object+relation&SubTreeArray[]=documentation&SearchPageLimit=5&SearchSectionID=18

Cheers!

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Francis Poézévara

Thursday 19 July 2007 2:22:00 am

Thanks, it solved all my problems :)

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