开发者

Magento 1.5 CE display search function in navigation bar

I am using Magento CE v1.5. Modern theme. I would like to display Search bar on the right hand side in the Navigation bar. Basically category menus on the left and search function on the right on a horizontal menu.

I have replaced top.bar with top.menu in catalogsearch.xml. The search function displays on the right with the following CSS

.form-search { margin:3px auto; float:right; position:absolute; right:20px; top:70px; }

I am just wondering do I need to do anything to top.phtml file because many other tutorials suggest you need to add

getChildHtml('topSearch') ?>

My search displays without the above code开发者_Python百科 in the top.phtml file.

Please suggest the correct way to go about achieveing search in the navigation bar in CE v1.5. Thank you.


If, getChildHtml() not loaded in a template that you work on, you can't show the block that you want. Try the following snippet :

<?php echo $this->getLayout()->getBlock('top.search')->toHtml() ?>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜