Forums / Setup & design / Sorting objects and searching by category?

Sorting objects and searching by category?

Author Message

James Robertson

Tuesday 23 May 2006 2:42:11 pm

We have a problem which we frequently come up against when designing eZ publish websites, as follows:

Certain articles (objects) need to be organized on the site by topic (metadata). These articles may relate to several topics. They also need to be searchable by topic. How best should the relationship between the article and the topics be represented in eZ publish?

Options we usually consider:
1. Create a Topic class and arrange the Article objects as children (primary and secondary nodes) of their related Topics. This maps nicely to the page hierarchy we want to create, but has a couple of problems: 1) adding an Article to topics as secondary nodes is kinda of clunky for the webmaster and 2) more importantly, we can not search by topic (without hacking the search engine) since only primary nodes are returned.

2. Create a multi-select 'topic' attribute in the Article class. This makes adding topics a breeze in the back-end but again is not searchable, since multi-select attributes are not supported by the search-engine's attribute filter. Also, a webmaster can not create (or delete) topics at will, since a change is required to the Article class (with unknown results if a topic is deleted).

3. Create a Topic class and add an 'eZobject relation list' attribute to the Article class. This is a much more feasible option now the eZ publish supports finding backward object relations. However is suffers from the same problems as option 1.

We usually go with option 1., since eZ systems have supplied us with a hack to the ezsearchengine plug-in kernel file (thanks guys). However, as described above, we do not feel that this is an ideal solution - not to mention that hacking the kernel is never a good idea! ;-)

Lots of people must face this same issue. Perhaps there is a simple solution we don't know about. Does anyone have any good suggestions?

Cheers
JamesR

James Robertson

Thursday 29 June 2006 3:31:49 pm

FYI: I ended up submitting this as a paid support request. I am probably not allowed to give you the full response from eZ systems, but the bottom line was:

"Unfortunately you are very right in your analysis of this issue, and there is
currently (to my knowlege) no simpler solution to this."

Thanks for the candor eZ systems. Unfortunately, this is a feature we require on most of our websites. Being able to (easily) manage many different kinds of metadata for our content objects, and allow our users to find objects in many different ways using this metadata, is something we try to focus on.

Xavier Dutoit

Monday 03 July 2006 1:59:13 am

Hi,

Try enhanced object relation, that's what I use in these cases.

X+

http://www.sydesy.com

Xavier Dutoit

Monday 03 July 2006 2:00:50 am

And the link:

http://ez.no/community/contribs/datatypes/enhanced_objectrelation

The config you want is list with checkbox.

X+

http://www.sydesy.com