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

eZ debug

Timing: Jan 19 2025 03:35:25
Script start
Timing: Jan 19 2025 03:35:25
Module start 'content'
Timing: Jan 19 2025 03:35:25
Module end 'content'
Timing: Jan 19 2025 03:35:25
Script end

Main resources:

Total runtime0.9146 sec
Peak memory usage4,096.0000 KB
Database Queries197

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0071 589.0859180.8125
Module start 'content' 0.00710.7300 769.8984562.1016
Module end 'content' 0.73710.1774 1,332.0000336.7422
Script end 0.9145  1,668.7422 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00440.4781210.0002
Check MTime0.00160.1754210.0001
Mysql Total
Database connection0.00070.081110.0007
Mysqli_queries0.838091.61931970.0043
Looping result0.00190.21321950.0000
Template Total0.885996.920.4429
Template load0.00200.221820.0010
Template processing0.883896.635420.4419
Template load and register function0.00010.012410.0001
states
state_id_array0.00100.104610.0010
state_identifier_array0.00070.079020.0004
Override
Cache load0.00180.1924310.0001
Sytem overhead
Fetch class attribute can translate value0.00150.161730.0005
Fetch class attribute name0.00130.142360.0002
XML
Image XML parsing0.00250.276130.0008
class_abstraction
Instantiating content class attribute0.00000.002080.0000
General
dbfile0.00450.4885330.0001
String conversion0.00000.000630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 20
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs