> 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
>> 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.
> > 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.
>> 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.
You must be logged in to post messages in this topic!