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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 19:27:33
Script start
Timing: Jan 18 2025 19:27:33
Module start 'layout'
Timing: Jan 18 2025 19:27:33
Module start 'content'
Timing: Jan 18 2025 19:27:34
Module end 'content'
Timing: Jan 18 2025 19:27:34
Script end

Main resources:

Total runtime0.8301 sec
Peak memory usage4,096.0000 KB
Database Queries60

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0071 589.1797152.6406
Module start 'layout' 0.00710.0037 741.820339.4766
Module start 'content' 0.01080.8177 781.2969557.0078
Module end 'content' 0.82850.0016 1,338.304712.1250
Script end 0.8301  1,350.4297 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.4917160.0003
Check MTime0.00140.1724160.0001
Mysql Total
Database connection0.00080.099110.0008
Mysqli_queries0.769892.7349600.0128
Looping result0.00070.0797580.0000
Template Total0.794495.720.3972
Template load0.00380.455920.0019
Template processing0.790695.235620.3953
Template load and register function0.00010.011710.0001
states
state_id_array0.00140.174310.0014
state_identifier_array0.00210.257020.0011
Override
Cache load0.00320.3809310.0001
Sytem overhead
Fetch class attribute can translate value0.00060.075420.0003
Fetch class attribute name0.00220.264560.0004
XML
Image XML parsing0.00080.097120.0004
class_abstraction
Instantiating content class attribute0.00000.002280.0000
General
dbfile0.00080.0955220.0000
String conversion0.00000.001140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 20
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs