Fetch object_id problem

Author Message

Ricardo Lindooren

Thursday 27 February 2003 4:38:25 am

Hello,

I’m having a problem with the following code:

{let test=fetch('content',object,hash(object_id,217))}
{$test|attribute(show,1)}
{/let}

When I use this code it returns data of a completely different (not even related) object.

I want to use this to retrieve the name of an object with a specific id-number.

Can somebody help me with this?

Thanks in advance,

Ricardo Lindooren

P.S.: I’m using eZ publish 3 release candidate 2

Jan Borsodi

Thursday 27 February 2003 6:56:41 am

> Hello,
>
> I’m having a problem with the following code:
>
> {let test=fetch('content',object,hash(object_id,217))}
> {$test|attribute(show,1)}
> {/let}
>
> When I use this code it returns data of a completely
> different (not even related) object.
>
> I want to use this to retrieve the name of an object with a
> specific id-number.
>
> Can somebody help me with this?

Are you sure the ID is an Object ID and not a Node ID?
The Object ID is the one used in content/edit while the Node ID is the one used for content/view.

>
> Thanks in advance,
>
> Ricardo Lindooren
>
> P.S.: I’m using eZ publish 3 release candidate 2

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Ricardo Lindooren

Thursday 27 February 2003 7:08:33 am

>> Hello,
>>
>> I’m having a problem with the following code:
>>
>> {let test=fetch('content',object,hash(object_id,217))}
>> {$test|attribute(show,1)}
>> {/let}
>>
>> When I use this code it returns data of a completely
>> different (not even related) object.
>>
>> I want to use this to retrieve the name of an object with a
>> specific id-number.
>>
>> Can somebody help me with this?
>
> Are you sure the ID is an Object ID and not a Node ID?
> The Object ID is the one used in content/edit while the Node
> ID is the one used for content/view.

You're right. I'm using a Node ID instead of an Object ID.
Now I understand why it didn't work.

Thank you for your helpfull input.

Ricardo Lindooren

Thursday 27 February 2003 7:11:01 am

> > Hello,
> >
> > I’m having a problem with the following code:
> >
> > {let test=fetch('content',object,hash(object_id,217))}
> > {$test|attribute(show,1)}
> > {/let}
> >
> > When I use this code it returns data of a completely
> > different (not even related) object.
> >
> > I want to use this to retrieve the name of an object with
> a
> > specific id-number.
> >
> > Can somebody help me with this?
>
> Are you sure the ID is an Object ID and not a Node ID?
> The Object ID is the one used in content/edit while the Node
> ID is the one used for content/view.

You're right. I'm using a Node ID instead of an Object ID.
Now I understand why it didn't work.

Thank you for your helpfull input.

Ricardo Lindooren

Thursday 27 February 2003 7:15:05 am

>> Hello,
>>
>> I’m having a problem with the following code:
>>
>> {let test=fetch('content',object,hash(object_id,217))}
>> {$test|attribute(show,1)}
>> {/let}
>>
>> When I use this code it returns data of a completely
>> different (not even related) object.
>>
>> I want to use this to retrieve the name of an object with a
>> specific id-number.
>>
>> Can somebody help me with this?
>
> Are you sure the ID is an Object ID and not a Node ID?
> The Object ID is the one used in content/edit while the Node
> ID is the one used for content/view.

You're right. I'm using a Node ID instead of an Object ID.
Now I understand why it didn't work.

Thank you for your helpfull input.

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