Forums / Developer / (will not work when used as multiple selector)

(will not work when used as multiple selector)

Author Message

Fabricio Guerrero

Monday 23 January 2006 6:14:55 am

Hi,

(will not work when used as multiple selector)

I've seen that comment all over the forum and documentation section but my problem :( is that i indeed have a Class with a multiple selector and an important part is for me to fetch and filter on that field.

To give a bit more detail we're creating a site based on articles and these articles can have various categories. As an user you can be able to view articles by categories. The fetch works if that Article only belongs to one category but if the article has various categories(multiple selector working here) the fetch just wont return the article...

I've tested various ways of filtering(like, in) but none seem to work. Here's the simple fetch:

{let
filter_cat=fetch( 'content', 'tree', hash( 'parent_node_id', 77,
class_filter_type, "include", class_filter_array, array(25),
attribute_filter, array( array( 'article_issue/category', '=', $selected ) ),
...

Thank you in advance for all help given...

Fabricio

http://www.solobromasychistes.com <<Joomla Site :P
http://www.recipesforhealthyfood.com/ <<Drupal Site :P
http://www.ezforge.com/ <<future ezCommunity, Articles, forums and more...

Fabricio Guerrero

Tuesday 24 January 2006 9:49:08 am

Hi,

Trying to bump this up... I've done a work around for this.. My need was or is to be able to Filter Multiple Selection Attributes.

Since all over this site it specifically indicates that the "attribute_filter" cann't filter these type of Attributes I rewrote the fetch using the 'search' 'text' feature... this way i can perform a text search in the Multiple Selection Attribute and get the Articles assigned to either one or multiple categories...

example fetch:

{def $search=fetch( 'content', 'search',
hash( 'text', 'value_looking_for_here',
'class_id', 25,
'class_attribute_id', multiple_selection_attribute_id_here,
'offset',$view_parameters.offset,
'limit', $numberOfObjects,
'sort_by', array( 'published', false() )
))}
{set search_result=$search['SearchResult']}
{set search_count=$search['SearchCount']}

...here start looping...

Does anybody have any other ways to filter a Multiple SelectionAttribute?

Regards,
Fabricio

http://www.solobromasychistes.com <<Joomla Site :P
http://www.recipesforhealthyfood.com/ <<Drupal Site :P
http://www.ezforge.com/ <<future ezCommunity, Articles, forums and more...

eZ debug

Timing: Jan 31 2025 06:20:31
Script start
Timing: Jan 31 2025 06:20:31
Module start 'content'
Timing: Jan 31 2025 06:20:31
Module end 'content'
Timing: Jan 31 2025 06:20:31
Script end

Main resources:

Total runtime0.1735 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0087 588.0625180.8125
Module start 'content' 0.00870.0047 768.875093.9297
Module end 'content' 0.01340.1601 862.8047523.3750
Script end 0.1735  1,386.1797 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00321.8516200.0002
Check MTime0.00130.7288200.0001
Mysql Total
Database connection0.00100.600910.0010
Mysqli_queries0.131475.70311410.0009
Looping result0.00110.63901390.0000
Template Total0.159792.010.1597
Template load0.00080.436910.0008
Template processing0.159091.608510.1590
Override
Cache load0.00050.296210.0005
Sytem overhead
Fetch class attribute can translate value0.00070.375810.0007
XML
Image XML parsing0.00020.136710.0002
General
dbfile0.00502.8936200.0003
String conversion0.00000.003230.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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs