Monday 29 March 2004 5:07:28 pm
Hi, As I understand it (I tested) attribute filter does not work on the ezobjectrelation datatype in the current release of ezpublish. So I executed the following sql script: UPDATE ezcontentobject_attribute SET sort_key_int=data_int WHERE contentclassattribute IN (187) Where 187 is the id of the ezobjectrelation contentclassattribute that I need to be able to do an attribute filter on. I had to execute this manually because adding 'ezobjectrelation' to the appropriate array in updateattributefilter.php didn't do anything for some reason (anyone know why?) Now I can do an attribute filter on that ezobjectrelation filter. In order to have the sort_key_int updated when a *new* attribute is added do I add the following code:? ezobjectrelationtype.php:
function sortKey($contentObjectAttribute) {
return $contentObjectAttribute->attribute('data_int'); }
function sortKeyType() {
return 'int'; } Will this have the intended effect? Also, might this have any adverse side affects anywhere else in ezpublish? I havn't seen any as yet, I just thought that the solution was so simple, and since ez systems hasn't added it it may be because a much more complex solution is required. Anyone in the ez systems crew want to comment on this (I doubt anyone else will know).
Regards, Willie
|