We were request if was possible to place the search module on top position, where's the cart.
If someone wants to have this on his template, please follow this instructions:
1) We need to create a new module position. So open templateDetails.xml file and add (let's call it) "top_search" module position. Like this:
- Code: Select all
<position>top_search</position>
2) Next we need to place this position on frontend. Open ../gk_yourshop/layouts/blocks/top.php file and find this line:
- Code: Select all
<?php if($this->countModules('cart')) : ?>
replace with this code:
- Code: Select all
<?php if($this->countModules('top_search')) : ?>
<div id="top_search">
<jdoc:include type="modules" name="top_search" style="none" />
</div>
<?php endif; ?>
<?php if($this->countModules('cart')) : ?>
3) Set style on top_search div. Open gk_stuff.css file and add this code:
- Code: Select all
#top_search {width: 220px;display:inline-block;float:right;margin: 37px 0 0 20px}
4) Go to module manager and publish mod_search on "top_search" module position. Assign to all menus.
That's it.
The result should be like this:
Enjoy