Forums / Developer / Search
justin kazadi
Wednesday 07 May 2008 7:19:06 am
Hello all,
I don't know why the search didn't work in my template. To have search i have write this: " <form action={"/content/search"|ezurl}> <label for="searchtext" class="hide">Recherche:</label> {if eq( $ui_context, 'edit' )} <input id="searchtext" name="SearchText" type="text" value="" size="11" disabled="disabled" /> <input id="searchbutton" class="button-disabled" type="submit" value="{'Search'|i18n('design/ezwebin/pagelayout')}" alt="Submit" disabled="disabled" /> {else} <input id="searchtext" name="SearchText" type="text" value="" size="14" /> <!-- supprimer<input id="searchbutton" class="button" type="submit" value="{'Search'|i18n('design/ezwebin/pagelayout')}" alt="Submit" /> --> <input id="searchbutton" class="button"type="submit" value="ok"/> {if eq( $ui_context, 'browse' )} <input name="Mode" type="hidden" value="browse" /> {/if} {/if} </form>
" excuse me for my bad english.Thanks in advance.
The theory is when we know everything and nothing works. The practice is when everything works and nobody knows why. If the practice and theory are met, nothing works and we do not know why. Albert Einstein
Abdelkader RHOUATI
Wednesday 07 May 2008 7:31:12 am
Hi,
Note : if input is disabled, he will not be sended in your form, may be that's your problem, try adding an input hidden! tks
Abdelkader
Abdelkader RHOUATI Blog (french) : http://arhouati.com ---- Extension arh_jdebug : EzDebug using jquery
Thursday 08 May 2008 2:22:40 am
hi,i have put disabled=enabled but the search don't work. and i have try enabled=enabled but nothing special.
André R.
Thursday 08 May 2008 2:30:34 am
there is nothing called disabled="enabled" in html / xhtml.But that is not your bug ( ref: "{if eq( $ui_context, 'edit' )}" code means that the search will only be disabled when you edit something).
your bug might be lack of whitespace between class and type 'class="button"type="submit"'!Alternatively you are running fastcgi and need to use ' method="post"' on your form!
eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription @: http://twitter.com/andrerom
Thursday 08 May 2008 4:32:18 am
hi,i have done what you have says.now i have this :
<form action={"/content/search"|ezurl} method="post"> <label for="searchtext" class="hide">Recherche:</label> {if eq( $ui_context, 'edit' )}
<input id="searchtext" name="SearchText" type="text" value="" size="11" disabled="disabled" /> <input id="searchbutton" class="button-disabled" type="submit" value="{'Search'|i18n('design/ezwebin/pagelayout')}" alt="Submit" disabled="disabled" /> {else} <input id="searchtext" name="SearchText" type="text" value="" size="14" /> <input id="searchbutton" class="button" type="submit" value="{'Search'|i18n('design/ezwebin/pagelayout')}" alt="Submit" /> {if eq( $ui_context, 'browse' )} <input name="Mode" type="hidden" value="browse" /> {/if} {/if} </form>but the search didn't work.
Thursday 08 May 2008 4:55:15 am
Works for me (when I past it into pagelayout).
Thursday 08 May 2008 5:32:36 am
hi, thanks you andré R for all. i want to know if search (and path)works only in pagelayout? it not possible to use it in a frontpage?.In my web site my pagelayout contains this: " <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{$site.http_equiv.Content-language|wash}" lang="{$site.http_equiv.Content-language|wash}">
<head>
<style type="text/css"> @import url({"stylesheets/soukstyle.css"|ezdesign(no)}); </style> <title>kazadi dans le projet soukafrika</title> </head> <body><!--debut body--> {$module_result.content} </body><!--fin body--> </html> "all the contents are in a frontpage (that i have overloaded).i think it the reason of this behavior.