mutlipe class search

mutlipe class search

Monday 03 May 2004 2:39:29 am - 8 replies

Author Message

Balazs Halasy

Monday 03 May 2004 4:28:43 am

Hi,

You'll have to use "advancedsearch" instead of just plain "search". The
following code demonstrates how you can let users search for only articles
and folders (content class 1 and 2) using the advanced search method:

<form action={"/content/advancedsearch/"|ezurl} method="post">
<input type="text" size="20" name="SearchText" value="" />
<input type="hidden" name="SearchContentClassID[]" value="1" />
<input type="hidden" name="SearchContentClassID[]" value="2" />
<input name="SearchButton" type="submit" value="Search" />
</form>

Use the "SearchContentClassID[]" to specify which classes that should be
returned. In the example above, we search for folders (1) and articles (2).
Also, make sure that you use the HTTP POST method, as demonstrated in the
code above (instead of GET, which is the default and which makes things
appear in the URL). When using the POST method, things will not appear in the
URL, and people will not be able to mess around with it.

However, the POST method can still be "hacked" by a user who is able to fake a
POST request. I think very few users would do this. BUT: if you *really* need
high level of "security" then you should either disable searching within the
attributes of the classes that shouldn't be searched (and then reindex the
entire content tree) or setup some kind of role/permission settings that
prevent people for viewing the "secure" part of your content.

Cheers.

Balazs

Roman Mudrack

Monday 03 May 2004 5:21:20 am

thanks

Fabricio Guerrero

Wednesday 04 May 2005 7:20:16 am

Hi,

in need of a similar function.. we need to search various classes but this search can also me multiple attributes.

I tried the following script that obviously didn&#180;t work:

<form action={"/content/advancedsearch/"|ezurl} method="get">

<input type="hidden" name="Content_search_attribute_fulltext_classattribute_id[]" value="9" />
<input type="text" name="Content_search_attribute_fulltext_value[]" value="{$search_array_by_class_attribute_id['9']['value']}" />

<input type="hidden" name="Content_search_attribute_fulltext_classattribute_id[]" value="431" />
<input type="text" name="Content_search_attribute_fulltext_value[]" value="{$search_array_by_class_attribute_id['431']['value']}" />

name="SearchText" id="Search" value="" />-->
<input class="searchbutton" name="SearchButton" type="submit" value="Search" />
<input type="hidden" name="SearchContentClassID[]" value="4" />
<input type="hidden" name="SearchContentClassID[]" value="29" />
</form>

what i'm basically trying to do is tell ez to search my user class based on the attribute_id= 9
and my persons class on the attribute_id= 431

More or less let users perform multi-attribute and multi-class searches.

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

steve walker

Wednesday 04 May 2005 7:56:34 am

Hi there,

Has anyone got any ideas on Fabricio's que? An indication of whether:

a) the advanced search facility has the ability to search on specific attributes as well as multiple classes, or

b) we need to build a new search page that does this via some sort of fetch?

My understanding from Fabricio is that you can search on specific attributes with a class, and you can search on multiple classes for any attribute - but you cant do both?

Any ideas?

Cheers, Steve.

http://www.oneworldmarket.co.uk

steve walker

Monday 09 May 2005 12:48:52 am

Bump! Any pointers on this - is searching specific attributes across multiple classes possible?

Thanks, Steve.

http://www.oneworldmarket.co.uk

steve walker

Monday 09 May 2005 11:18:54 am

Hi there,

We'd really appreciate some help on this, even if its:

- "no, we don't think its possible", or

- "of course its possible, you should have read..."

Thanks.

http://www.oneworldmarket.co.uk

Ɓukasz Serwatka

Monday 09 May 2005 12:18:30 pm

Hi Steve,

Have you read this document?
http://ez.no/ez_publish/documentation/customization/components/search/custom_search_box

and

http://ez.no/community/forum/setup_design/custom_advanced_search_question

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

steve walker

Tuesday 10 May 2005 9:20:31 am

Many thanks.

Steve.

http://www.oneworldmarket.co.uk

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

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