eZ Community » Forums » Extensions » eZ Find » autocompletion in one class
expandshrink

autocompletion in one class

autocompletion in one class

Monday 20 June 2011 9:08:53 pm - 3 replies

Good evening,
 I set up the extension ezfind. The auto-completion works on my text field, but I would look on one class. (Article). But all classes are displayed. Indicate how this class?
 My js:

          <script type="text/javascript">
            jQuery('#ezautocompletecontainer').css('width', jQuery('input#searchtext').width() + 60);
            
            var ezAutoHeader = eZAJAXAutoComplete();
            ezAutoHeader.init({ldelim}
                url: "{'ezjscore/call/ezfind::autocomplete'|ezurl('no')}",
                inputid: 'SearchText',
                containerid: 'ezautocompletecontainer',
                minquerylength: {ezini( 'AutoCompleteSettings', 'MinQueryLength', 'ezfind.ini' )},
                resultlimit: {ezini( 'AutoCompleteSettings', 'Limit', 'ezfind.ini' )}
            {rdelim});
        </script>

 My div:

               <div class="search">
                <input type="text" id="SearchText" name="SearchText" class="text_search ac_input" value="Rechercher" />
                <div id="ezautocompletecontainer"></div>
              </div>

Someone had this problem?

Modified on Monday 27 June 2011 4:59:52 pm by Jonathan Clavier

Tuesday 01 November 2011 10:31:33 pm

Check your search fetch. If you want to limit results to one class just add Class ID Limitation to the fetch.  Your can find the documentation here

Friday 06 January 2012 5:04:38 pm

Hi,

I am facing the same problem as Jonathan Clavier.

I would like to make the eZ Find autocomplete work on a certain class only. Is this possible in any way?

@Tyler Harms - I think your solution does not apply to auto-completion.

Thanks,

Bogdan

Friday 26 April 2013 11:36:54 pm

Hi guys,

There is currently no way to filter by subtree or class the autocomplete results. I needed that feature too so that I can add autocomplete to the search when editing object relation or object relations.

I wanted to be able to filter by class if the attribute had a class restriction on it or a subtree filter if a default selection folder was set.

I just made two pull requests, one on the eZ Find repository to allow the server-side script to accept a subtree and a list of classes (coma separated in a string), the second on the ezpublish_legacy repository to add the autocomplete feature on the object relation and object relation list edit templates if eZ Find with autocomplete is enabled.

If you're still looking for the solution to this problem, you can have a look at these pull requests here:
https://github.com/ezsystems/ezfind/pull/106
https://github.com/ezsystems/ezpublish-legacy/pull/620

Modified on Friday 26 April 2013 11:39:51 pm by xavier cousin

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from