Would it be possible to move the Search-function (in the header in the originla Kosmos-theme) to a block which I could place wherever I like?
Would it be possible to move the Search-function (in the header in the originla Kosmos-theme) to a block which I could place wherever I like?
No need to make it as a block. It's easier to put it in separate file. Let's call it search_box.htmlThen to load it in any template files, use the following command:Code:<form method="get" action="search.php"> <%if $category_path_search_opt%> <input type="hidden" name="cat" value="<%$cat%>" /> <%/if%> <input type="text" name="keyword" size="20" value="<%$keyword%>" /> <select name="opt"> <option value="0">the entire directory</option> <%if $category_path_search_opt%> <option value="1">Only in <%$category_path_search_opt%></option> <%/if%> <%if $opt eq "2"%> <option value="2" selected="selected">on the web</option> <%else%> <option value="2">on the web</option> <%/if%> </select> <input type="submit" value="Search" /> </form>
Code:<%include file="search_box.html"%>
It doesn´t work. I get the following error message:
I have replaced my own domain in the code above with "domain". Otherwise I have done exactly as you wrote. I´m trying to include the file in the template index.html.PHP Code:Warning: Smarty error: unable to read resource: "search_box.html" in /customers/domain/domain/httpd.www/lib/smarty/Smarty.class.php on line 1088
Do I have to make any changes to any Smarty-file?
Have you created search_box.html? It must be placed in the active theme you have, by default in /themes/kosmos/search_box.html