Forums / Developer / Custom Article Sorting Menu Item

Custom Article Sorting Menu Item

Author Message

Daniel Ferenc

Saturday 03 January 2009 9:12:21 am

Hi *!

I'm working on a recipe based site where I created a new content type (recipe) that is very similar to article but has some additional fields (food type, etc). I would like to sort the recipes by these properties by having a menu where a user can click ("chicken" for example) and the system lists all recipes containing the "chicken" property.

Can anyone point me to a good place in the documentation or provide some basic information on where to look and start working on this? I'm an experienced PHP coder but this is my first (but not last!) encounter with ez Publish and the whole code structure is very very new to me!

Thanks in advance,
V00D00

André R.

Saturday 03 January 2009 2:50:29 pm

Hi!

We setup a similar site a year a go, dinmat.no.
'Type', as in dinner/meat/chicken, is setup as placement*, to spread the recipes over several folders to make sure performance is not decreased as several thousands recipes are added over time.
And so that the site can use multiple node placement for recipes that goes into several category's.
For time use, as in 'made in 20 minutes', 'enhanced selection' extension is used(lets you rearrange selections later on). And for dinner Theme, like Christmas or single food, object relationlist is used with custom extended attribute filter(objectrealtionfilter extension) witch allows multiple selection.

* A subtree for the recipes is setup with a custom folder class called 'recipe folder' with a template that does a content tree fetch from the node your on and down. The input variables for the other filter types (time, theme, offset and a couple of others not is use currently) use view parameter (like '/(time)/ten'). And to keep template code as low as possible, all the fetch code with filtering is done by a template operator. And the code to determine what menus that are selected is done by another(only needed for object relations though, as they are multiple selction).

Example:
http://dinmat.no/Finn-oppskrifter/Oppskrifter/Middag/Kj%C3%B8tt/(tid)/ti/(tema)/178/177
As in (the numbers are for the object relations):
domain/find-recipes/recipes/dinner/meat/(time)/ten/(theme)/178/177

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

eZ debug

Timing: Jan 20 2025 05:15:40
Script start
Timing: Jan 20 2025 05:15:40
Module start 'content'
Timing: Jan 20 2025 05:15:41
Module end 'content'
Timing: Jan 20 2025 05:15:41
Script end

Main resources:

Total runtime1.1967 sec
Peak memory usage4,096.0000 KB
Database Queries191

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0093 588.9609180.8281
Module start 'content' 0.00930.9896 769.7891534.5938
Module end 'content' 0.99890.1978 1,304.3828332.7422
Script end 1.1967  1,637.1250 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00440.3644210.0002
Check MTime0.00150.1214210.0001
Mysql Total
Database connection0.00140.116310.0014
Mysqli_queries1.113293.02071910.0058
Looping result0.00390.32531890.0000
Template Total1.154896.520.5774
Template load0.00190.158520.0009
Template processing1.152996.335420.5764
Template load and register function0.00020.018510.0002
states
state_id_array0.00130.111510.0013
state_identifier_array0.00220.186020.0011
Override
Cache load0.00150.1295200.0001
Sytem overhead
Fetch class attribute can translate value0.00200.168930.0007
Fetch class attribute name0.00150.125730.0005
XML
Image XML parsing0.00090.077830.0003
class_abstraction
Instantiating content class attribute0.00000.001130.0000
General
dbfile0.00450.3789280.0002
String conversion0.00000.000530.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/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
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 13
 Number of unique templates used: 6

Time used to render debug report: 0.0008 secs