Getting output from my custom class

Author Message

Pål Øystein Carlsen

Wednesday 05 November 2003 7:58:34 am

Hi.
I have created a custom class 'reference' that belongs to the 'content' group, it has class id:16. It has two attributes, 'client', and 'description'.

I have created a section called references and a folder assigned to that section called reference.

I would like to print all the reference objects contained in my reference folder. I have done this for standard Articles without problems, however it seems to be something wrong with my way of fetching objects.

{let children=fetch(content, list, hash(parent_node_id, $node.node_id, class_filter_type, include, class_filter_array, array(16) ) )}

when I try to loop through with
{section name=Child loop=$children}
{node_view_gui view=line content_node=$Child:item}
{/section}

nothing happens. If I insert a <p>debug</p> inside the {section}{/section} nothing is printed. (it should get printed twice since I have two objects of that class)
I do have reference objects created.
the reference.tpl which contains this code sucessfully overides the full.tpl

I have a file called line_view_ref.tpl which overrides line.tpl. It contains the following code
{attribute_view_gui attribute=$node.object.data_map.client} should it not print out the 'client' attribute of my objects.

Please, what am I missing? I am going crazy looking at this, any input would be very welcome indeed.

Paul Borgermans

Wednesday 05 November 2003 8:26:52 am

It may be that the anonymous user has no rights for your new class

hth

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Pål Øystein Carlsen

Wednesday 05 November 2003 2:12:19 pm

Good point, and actually I initially had not tought of that, but unfortunatly, I have added read rights to my new class to Anonymous User some time ago(I had a problem with access rights at another stage so I was aware of it for my new class), with no luck.

Any other ideas?

Valentin Svelland

Thursday 06 November 2003 8:57:00 am

aaaaaaaaaaarrgh! Of course!! Paul, you just pointed out the obvious little thing that had slipped my mind this time... Sure, that's way my perfectly good override wouldn't behave.. :D Tnx! God I love these forums!!

Dariusz Wlodarczyk

Thursday 06 November 2003 9:04:45 am

I have the same problem :(
Anybody knows the answer ?

Paul Forsyth

Thursday 06 November 2003 11:02:30 am

Try a couple of things:

Give all permissions to the anon user (* * *). That *should* work.

Try browsing to one of the nodes in question directly, eg.

http://<your-site>/content/view/full/XX

where XX is the node id you'll find in the admin.

If full permissions work then have a look to see if you've missed something. Have you given permissions for the new section too?

paul

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