Need help to custom the advanced search template

Author Message

Sébastien Antoniotti

Monday 08 January 2007 2:07:21 am

Hi,

I'm looking for a solution to display only some classes in the first dropdown of the advancedsearch.tpl.

Actually the select is build like this :

<select name="SearchContentClassID">
<option value="-1">{"Any class"|i18n("design/standard/content/search")}</option>

{section name=ContentClass loop=$content_class_array }

<option {switch name=sw match=$search_contentclass_id}
{case match=$ContentClass:item.id}
selected="selected"
{/case}
{case}
{/case}
{/switch} value="{$ContentClass:item.id}">{$ContentClass:item.name|wash}</option>

{/section}
</select>

So I would like to custom the $content_class_array in order to manually specifiy the classes.

Thanks in advance !

eZ Publish Freelance
web : http://www.webaxis.fr

Stephane Cottin

Tuesday 13 January 2009 8:26:07 am

no reply / solution ?

Christophe Condomines

Wednesday 14 January 2009 1:04:30 am

You may define your own arrays of "content class id" and "content class name" in the template and loop on it. Or better, define the array in an .ini file

Something like:

{def $myCCID=hash(1=>'Folder',2=>'Article')}

{foreach $myCCID as  $id => $name}
  <option value="{$id}">{$name|wash}</option>
{/foreach}

Microblau SL
http://www.microblau.net

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