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
|