Please preview the page in the admin interface: go to the issues list and
click on issue preview icon. Navigate to the page containing the search form
in the preview window if necessary. Check if the template engine displays
any error in the bottom pane.
Also, in the {{ search_form }} statement, why did you insert the "templates"
directory:
template="templates/search-result.tpl"
Whenever you include or declare a template you must not use the "templates"
directory as a prefix, it's implicit. Only use directory names if the
included template was in a subdirectory of the templates directory. E.g.:
you have the following 2 templates:
- templates/index.tpl
- templates/skin/box.tpl
In index.tpl you would write:
{{ include file="skin/box.tpl" }}
not {{ include file="templates/skin/box.tpl" }}
I tested this code snippet after replacing the template name and it works ok
for me.
Mugur
On Thu, Mar 4, 2010 at 7:51 PM, wrote:
> Author: Terix
> Link: http://code.campware.org/phorum/read.php?8,8205,8205#msg-8205
>
> --------------------------------------------------------------------------------
>
> Hi everybody,
>
> i'm trying to make a search box with this code:
>
> {{ local }}
> {{ unset_issue }}
> {{ unset_topic }}
>
> {{ search_form template="templates/search-result.tpl" submit_button="Cerca"
> button_html_code="class=\"submitbutton\"" }}
> {{ camp_edit object="search" attribute="keywords"
> html_code="class=\"text\"" }}
> {{ /search_form }}
>
> {{ /local }}
>
>
> but when i go to the page website, there are no boxes, and there is nothing
> inside the div. There is something that i'm missing?
>
> --
> Sent from Campware Forums
> http://code.campware.org/phorum
>
Hi, i've fixed those things and now the search is working.. but now i have a question: how does search works? In other word, how is used the string that i put on the textbox? can i configure the behaviour of the search like searching the string inside the body of the articles?