Forums / Developer / Get a content attribute object with only the attribute id
Maxime Thomas
Thursday 26 March 2009 3:01:59 am
Hi,
A good one. I've got the content attribute id of an attribute and I would like to get the last attribute object. I searched in the API, try to use the fetch function but apparently you have to get the version id to to fetch the correct attribute but I don't have this one. You can get it but it's in the attribute object... :-(
So, how can I get the last version id which can help me to get the last attribute ?
It's working in other part of eZPublish because you already know the content on which your are. As it's an ajax feature, I don't have this piece of information.
$attribute = eZContentObjectAttribute::fetch($attribute_id, 1);
Thanks for any help.
Maxime Thomas maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou Company Blog : http://www.wascou.org/eng/Company/Blog Technical Blog : http://share.ez.no/blogs/maxime-thomas