Forums / General / How would YOU make this in eZ publish?

How would YOU make this in eZ publish?

Author Message

Jonny Bergkvist

Monday 15 September 2003 2:24:35 am

Hi!

We have several small classical database-applications on our old web made manually with php+custom mysql-tables.

We hope we can put the content of many of these into eZ.

1 illustrating example:
---------------------------

We have 5 (book-)libraries here at Telemark University College at different geographic locations. All have magazine-collections, and they want to have have a web-app. to store the following information of each magazine:

* name of magazine
* subject area (from a prefefined selection of areas, ie: computing, health, science)
* library (which of the 5 libraries have this magazine)
* ...some other details about each magazine, just straight-forward class-attributes...

The library want these functions:
* limit search to 1 of the libraries
* limit search to 1 subject area
* limit search to both of the above limits

I hope YOU could tell me and other forum-users how you would make such a typical database-application with eZ publish classes, templates, and content structure

I believe this is at very common 'case'; how to put typical relational database content into eZ publish.

Paul Forsyth

Monday 15 September 2003 5:48:20 am

You are right, this is a common case where ez publish can be used very effectively.

I would suggest you begin by reading the documentation and plan out the structure of your classes, objects and what templates you need. It is probably quicker for you to start with this rather than forum users giving you detailed instructions about what to do. You will learn quicker too :)

If you do have problems do post to the forums. We know a lot about problems :)

Paul

Jonny Bergkvist

Tuesday 16 September 2003 12:56:59 am

Thanks for answer Paul :-)

First, I am not new to eZ publish, but still I wonder how to do some special things in the best way.

I can try to ask more directly;

With 1 predefined category-list (ie. subject-area: computing, health, science...) I would make folders with these names, and put magazines into the right folder.

With 2 (or more) predefined category-lists (subject area + a list of 5 locations) i get more uncertain whats the best solution.
I think I would use folders for subject-area, and store the location into a class-attribute in the magazine-class, and then make some smart template-code that store and fetch ie. a value from a combo-box. This will make a user-friendly interface, but I don't like the thought of having to make custom templates also for the admin sitedesign.

Am I thinking right? I don't like the thought of having to make custom templates for the admin-part... So I hope there is easier ways of doing this.

Jonny

Paul Forsyth

Tuesday 16 September 2003 1:32:00 am

You don't need to alter the standard admin classes for your use. You may want to if you need to change the admin but i don't think you need to at this stage. Consider the following.

If i read you right you could make a class with these attributes (essentials for now, but you can add more).

Magazine:

- name (textline)
- category (multi-line enum)
- libraries (multi-line enum)

The name will be a simple textline. The category i've classes as a multi line enumeration since some of your magazines may fall into two categories but you can class it as a single if your categories are distinct.

The libraries are a multi line enumeration. When you create an object for this class you can decide which libraries the magazines are in. If another library gets the magazine then just update the object.

This means you could just have a single folder within the admin to hold all of magazine objects. On your user side you can present the information in any way you want, sort by category, whatever.

However, you may choose to use your idea of a folder per category. In this case i suggest maybe keeping the category field just to handle the cases where the magazine is in more than one category, and note it when displaying the objects in your folder category. But you can get rid of it if you wish.

I've tried to show the flexibility you have for your problem. Again, it is a standard use of ez and once you begin to use it you should start to see of other ways to present your data. When i started my designs changed by the hour. Now im a little better, i change them every few days ;) Well, when im designing that is!

Paul

Jonny Bergkvist

Tuesday 16 September 2003 3:15:44 am

Thanx a lot Paul!

Strange that I never have discovered/tested the enum-datatype.

That was certainly my "missing link" :-)

Now back to do the work!

Jonny

Bård Farstad

Tuesday 16 September 2003 3:49:58 am

Jonny, I would look into the selection datatype. It's faster than enum and does basically the same.

Enum is a bit slow on larger sites.

--bård

Documentation: http://ez.no/doc

Thomas Brandl

Tuesday 16 September 2003 4:41:10 am

If you should run into problems with selection, have a look at http://ez.no/developer/ez_publish_3/bug_reports/selection_datatype_new_options_cannot_be_added