Fetch limit of zero doesnt give zero results?

Author Message

steve walker

Thursday 07 October 2004 1:47:48 am

Hi there,

Am seeing something strange with fetches and limits - seems that if you specify a limit of '0' it is interpreted as no limit at all.

I am using Paul B's contrib from http://ez.no/community/contributions/hacks/more_attribute_filter_operators_and_fetch_by_owner_id but have tested it on normal fetch and seems to replicate same result.

So, for instance - in folder.tpl, if you change 'page_limit=10' to 'page_limit=1' you get 1 result returned. If its changed to 'page_limit=0' you get full list of results returned rather than none.

The reason I need to achieve this is so this will work: http://www.ez.no/community/forum/setup_design/advanced_search_development_homemade_fuzzy_logic/re_advanced_search_development_homemade_fuzzy_logic__17

Is it not possible to have a zero page limit return zero results?

Thanks, Steve.

http://www.oneworldmarket.co.uk

Paul Borgermans

Thursday 07 October 2004 3:06:29 am

Hi Steve,

limit 0 means limit = false, so it is by design and has nothing to do with ly modifications.

I think you should surround the fetch by a test with {section show= } and not perform the test at all when you should not retrieve nodes.

hth

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

steve walker

Thursday 07 October 2004 3:26:50 am

OK, Thanks Paul.

Will go down the section route!

Regards, Steve.

http://www.oneworldmarket.co.uk

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