Forums / Setup & design / Problems fetching custom content class

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

Problems fetching custom content class

Author Message

Gintautas S.

Saturday 26 July 2008 9:44:44 am

Hi, first time poster :)

I have no problem using overriden (by me) templates to generate HTML for built in classes and classes, which I made from built-in classes (by copying and then editing the definitions from admin interface). But when I tried to fetch some nodes which happen to be of class defined by me from scratch, it doesn't work. I have ruled out the posibility of bogus template code, because once I created a built in class object under the same node under which my custom class objects reside, it showed in the result.

I use template function { fetch( content, list, hash( parent_node_id, $node.node_id ) ) }.

When I tried turning debugging on, I saw that there was no template calls for those objects at all! So I guess I might need to register my new class with the Exponential system perhaps?

Ivo Lukac

Saturday 26 July 2008 10:27:53 am

Hi Gintautas

Reed this:
http://ez.no/doc/ez_publish/technical_manual/3_9/templates/the_template_override_system

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Gintautas S.

Saturday 26 July 2008 11:06:56 am

I know overrides are working for me, because I have used them for some classes successfuly. It's some kind of fetching problem, because once I 'have' the array of fetched objects, there should be a call to appropriate template which is not the case. I saw this by inspecting debug info ("show used templates"). I don't reach the override point so to speak, because the default template (node/view/full.tpl) isn't getting called for my class objects, but again override works fine for predefined classes (I can see it in debug info: source template and then the template with which it is overriden are listed). I know this is confusing, but I need to get it solved somehow.

SO maybe I have to 'register' my newly defined class somewhere, for instance in an .INI file?

Ivo Lukac

Saturday 26 July 2008 12:14:13 pm

When you create objects from your custom class they should show up with node/view/full.tpl and node/view/line.tpl . Then with override system you use your templates. It is simple. You either:
- didn't configured your override.ini well
- placed your templates in wrong location
- didn't cleared the override cache

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac