Forums / General / Search Layout
Masamune
Thursday 02 June 2005 5:19:20 am
I know how to override the template for adv. Search, but what if I want to change the layout:
- I may override the pagelout for search - but how? - usuallay we speicfy node, class, section..
- Do some logic in the pagelayout - but how? - same problems, how to catch the module variable to know it's for adv. search..
cheers..
Ćukasz Serwatka
Thursday 02 June 2005 5:22:20 am
Hi,
You can try to use "layout" module (settings/layout.ini), and pass variable via GET to the template. Then use search operator and loop to present result.
Here you can read more about custom search boxhttp://ez.no/ez_publish/documentation/customization/components/search/custom_search_box
Personal website -> http://serwatka.net Blog (about eZ Publish) -> http://serwatka.net/blog
Thursday 02 June 2005 5:42:23 am
Thank you for the tip..It worked well except one problem:
Suppose I associated searchLayout.tpl to search.tpl I should write in the url: <i>../layout/set/searchLayout/search</i>This worked well, but then what's happening, all relative paths are being preceded by layout/set/searchLayout/
Suppose for example I have a normal uri : <i>/content/view/full/104</i> when accessing this uri from the searchLayout after using the layout module the uri becomes:<i>../layout/set/searchLayout/search/content/view/full/104</i>
Any possible reason for this problem.. 10x.
Joel Hardi
Sunday 24 July 2005 11:46:05 am
I find it easier to just use some logic in pagelayout.tpl, like you first suggested. Just use a {section} like this:
{section show=or($module_result.uri|contains('content/search'), $module_result.uri|contains('content/advancedsearch'))} {include uri="design:search_sidebar.tpl"} {section-else} {include uri="design:regular_sidebar.tpl"} {/section}