Custom class based on another class

Author Message

Noicokuna Niemoge

Monday 12 January 2009 3:32:46 am

Hello;

I would like to create a class based on image class, that would be:

- just an image class with added custom fields displaying data (I need also other fields (text lines), not only "caption".)
- it could use gallery as a a container, or a gallery-based class.

What's the easiest way to achieve this? I'm pretty confused... especially as I wonder which template should I override and how... or should I? I remember I added a field once, but the results didn't show up in an image viewed in a gallery. I'd also like to change the caption and image view order. How should I do this?

In addition, the design->template section seems to have errors (pagination and filter don't work), but it's a sidenote... is it a known bug or maybe my installation went bad at some point?

Shiki soku ze ku...

kracker (the)

Monday 12 January 2009 4:25:38 am

Hello,

I would create a copy of the image class
named differently. ie: image -> summerimage
using the class editor built into eZ Publish. <i>/class/list</i>

This allows you to customize the class.
(I agree it would be kinda cool to be
able to say summerimage was based
on image and only customize what was needed)

Then create a template override for the class in your
primary design folder's templates as needed.

I would recommend learning to create templates, settings, etc
files by hand instead .... of the RAD tools currently built into eZ or
current extension compatibility.

Still I recommend trying the extension providing "smooth gallery" functionality,
<i>http://ez.no/developer/contribs/applications/ez_smoothgallery
http://smoothgallery.jondesign.net/what/</i>

<i>
//kracker

Em : The Recovery : Gone Again Pt. 2, Mix'em up ...</i>

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

Noicokuna Niemoge

Monday 12 January 2009 4:51:30 am

Thanks, kraker :)

The most irritating is the bug in design->templates which doesn't allow me to browse all system templates... do you have the same problem? (I'm using eZ 4.0.1, both pagination and filter don't work.)

So I think my best bet would be manual copying and editing template files and overriding them in INI settings... right?

Yep, I already created a copy of image class and set the additional fields, just the template overrides seem pretty time-consuming for me... too bad the system doesn't copy the template overrides as well. :) It would be easier to edit them. OK, I'll be back if I stumble upon next problems. (Hopefully not)

Shiki soku ze ku...

kracker (the)

Monday 12 January 2009 5:20:57 am

<i>The most irritating is the bug in design->templates which doesn't allow me to browse all system templates... do you have the same problem? (I'm using eZ 4.0.1, both pagination and filter don't work.)</i>

Those tools never worked very well for me, always causing other negative issues to come up as well. Short answer yes, those have not worked for me in the past and I stoped using them. Sorry ...

<i>So I think my best bet would be manual copying and editing template files and overriding them in INI settings... right?</i>

It is your best bet to getting things working more quickly. Remember to enable ShowUsedTemplates debug to help you while troubleshooting template override problems.

<i>Yep, I already created a copy of image class and set the additional fields, just the template overrides seem pretty time-consuming for me... too bad the system doesn't copy the template overrides as well. :) It would be easier to edit them. OK, I'll be back if I stumble upon next problems. (Hopefully not) </i>

You get faster at it and it has a why to it. But yes too bad a system to copy classes and default templates into a design folder does not yet exist. It might be useful to fully customize an eZ Publish design more quickly.

Cheers,
<i>//kracker

Em : The.Recovery : Bonus Track 15</i>

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

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