Add Search box to header
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
-
- Joomla! Fledgling
- Posts: 4
- Joined: Thu Sep 10, 2009 8:22 am
Add Search box to header
Hi guys, I'm wondering if somebody could help me figure out how I insert a search box (and button) to the lower right hand corner of my header. I'm under the impression that I need to create a new module position, but I do not know how to do that.
Any help is greatly appreciated. Thanks!
Any help is greatly appreciated. Thanks!
- OOmNezar
- Joomla! Ace
- Posts: 1869
- Joined: Mon Sep 07, 2009 3:18 am
-
- Joomla! Fledgling
- Posts: 4
- Joined: Thu Sep 10, 2009 8:22 am
Re: Add Search box to header
But then the search box is at the top middle of my header, not the bottom right, like I want.wakjaer wrote:overlap it to top menu
- Alextampa
- Joomla! Guru
- Posts: 557
- Joined: Fri Jan 09, 2009 3:16 pm
- Location: Tampa
Re: Add Search box to header
Open up your index.php
Paste this code (after changing the names to whatever you want. Where you would like the module to be. Most likely after <div id logo></div>
<div id="name-it-whatever"><jdoc:include type="modules" name="position-name" /></div>
Open Up templatedetails.xml (with notepad)
Paste this
<position>position-name</position>
Open up template.css
Paste this code, and change the position to wherever you need to it move to, and the height and width
div#YourDivName{height:15px;position:relative;right:0px;top:-3px;}
Paste this code (after changing the names to whatever you want. Where you would like the module to be. Most likely after <div id logo></div>
<div id="name-it-whatever"><jdoc:include type="modules" name="position-name" /></div>
Open Up templatedetails.xml (with notepad)
Paste this
<position>position-name</position>
Open up template.css
Paste this code, and change the position to wherever you need to it move to, and the height and width
div#YourDivName{height:15px;position:relative;right:0px;top:-3px;}
-
- Joomla! Fledgling
- Posts: 4
- Joined: Thu Sep 10, 2009 8:22 am
Re: Add Search box to header
Hmm, I opened up my index.php but was unable to find anywhere that I would insert the instructions. I could not find <div id logo></div>.
I should point out that I'm a relative newbie to this stuff, so I'm hoping you could be a bit more detailed in the description/instructions if possible . Thanks.
I should point out that I'm a relative newbie to this stuff, so I'm hoping you could be a bit more detailed in the description/instructions if possible . Thanks.
-
- Joomla! Fledgling
- Posts: 4
- Joined: Thu Sep 10, 2009 8:22 am
Re: Add Search box to header
When you say 'paste this code wherever you want the module to be' how do I know where the module will end up. I want it in the lower right hand corner of the header, but I do not know to translate that wish into putting it in the correct place in my index.php file.
This is one line I found in the file:
"wrapper_r">
<div id="header">
<div id="header_l">
<div id="header_r">
<a href=index.php><div id="logo"></div></a>
<jdoc:include type="modules" name="top" />
</div>
Where do you suggest I put:
<div id="name-it-whatever"><jdoc:include type="modules" name="position-name" /></div>
in order for my module to show in the right hand side of the header?
This is one line I found in the file:
"wrapper_r">
<div id="header">
<div id="header_l">
<div id="header_r">
<a href=index.php><div id="logo"></div></a>
<jdoc:include type="modules" name="top" />
</div>
Where do you suggest I put:
<div id="name-it-whatever"><jdoc:include type="modules" name="position-name" /></div>
in order for my module to show in the right hand side of the header?
- OOmNezar
- Joomla! Ace
- Posts: 1869
- Joined: Mon Sep 07, 2009 3:18 am
Re: Add Search box to header
BEFORE:
<div id="header">
<div id="header_l">
<div id="header_r">
<a href=index.php><div id="logo"></div></a>
<jdoc:include type="modules" name="top" />
</div>
AFTER:
<div id="header">
<div id="header_l">
<div id="header_r">
<a href=index.php><div id="logo"></div>
<div id="name-it-whatever">
<jdoc:include type="modules" name="position-name" /></div></a>
<jdoc:include type="modules" name="top" />
</div>
<div id="header">
<div id="header_l">
<div id="header_r">
<a href=index.php><div id="logo"></div></a>
<jdoc:include type="modules" name="top" />
</div>
AFTER:
<div id="header">
<div id="header_l">
<div id="header_r">
<a href=index.php><div id="logo"></div>
<div id="name-it-whatever">
<jdoc:include type="modules" name="position-name" /></div></a>
<jdoc:include type="modules" name="top" />
</div>
coffee & smoke just fine
OOm Nezar
- Alextampa
- Joomla! Guru
- Posts: 557
- Joined: Fri Jan 09, 2009 3:16 pm
- Location: Tampa
Re: Add Search box to header
<div id="header">
<div id="header_l">
<div id="header_r">
<a href=index.php><div id="logo"></div></a>
<div id="name-it-whatever">
<jdoc:include type="modules" name="position-name" /></div></a>
<jdoc:include type="modules" name="top" />
</div>
This is correct.
<div id="header_l">
<div id="header_r">
<a href=index.php><div id="logo"></div></a>
<div id="name-it-whatever">
<jdoc:include type="modules" name="position-name" /></div></a>
<jdoc:include type="modules" name="top" />
</div>
This is correct.
-
- Joomla! Intern
- Posts: 56
- Joined: Wed Jul 16, 2008 5:18 pm
- Location: Berlin, Germany
- Contact:
Re: Add Search box to header
thanks a lot!!!
great post, i finally know how to put in a new position, thanks alex!
great post, i finally know how to put in a new position, thanks alex!
-
- Joomla! Apprentice
- Posts: 20
- Joined: Fri Oct 31, 2008 10:47 pm
Re: Add Search box to header
Close to what I was considering, Is it possible to put it inline with the menu buttons in the top menu? I'm using a JS optimus free template.
I was wondering if it you could somehow tell a second module to publish inthe position top or something?
I was wondering if it you could somehow tell a second module to publish inthe position top or something?
-
- Joomla! Apprentice
- Posts: 8
- Joined: Sat Sep 26, 2009 12:04 am
Re: Add Search box to header
Thanks for this post---very helpful!
-
- Joomla! Apprentice
- Posts: 5
- Joined: Sat Sep 26, 2009 3:40 pm
Re: Add Search box to header
ahh thanks its help in some ways
-
- Joomla! Fledgling
- Posts: 1
- Joined: Thu Oct 08, 2009 6:26 pm
- Location: Los Angeles, CA
- Contact:
Re: Add Search box to header
Thanks so much for this info--I was beginning to think it was rocket science and I wasn't going to cut it! I used your info to add a new module position in the upper right hand corner of the header of the milkyway template. I had searched and searched forums and got posts like: if you don't know css, html, and php, I can't tell ya how to do it. thanks for making it so simple!Alextampa wrote:Open up your index.php
Paste this code (after changing the names to whatever you want. Where you would like the module to be. Most likely after <div id logo></div>
<div id="name-it-whatever"><jdoc:include type="modules" name="position-name" /></div>
Open Up templatedetails.xml (with notepad)
Paste this
<position>position-name</position>
Open up template.css
Paste this code, and change the position to wherever you need to it move to, and the height and width
div#YourDivName{height:15px;position:relative;right:0px;top:-3px;}
- OOmNezar
- Joomla! Ace
- Posts: 1869
- Joined: Mon Sep 07, 2009 3:18 am
Re: Add Search box to header
Make sure to mark this discussion as SOLVED !!!!!
coffee & smoke just fine
OOm Nezar
-
- Joomla! Fledgling
- Posts: 4
- Joined: Tue Jun 21, 2016 1:42 am
Re: Add Search box to header
The Joomla version I'm using is 1.5.25. I want to add a search button at the bottom right of my header but I can't find the index.php that was mentioned. Can anyone help
- Templatemesh
- Joomla! Apprentice
- Posts: 44
- Joined: Wed Jun 25, 2014 6:40 am
- Location: Chennai, India
- Contact:
Re: Add Search box to header
For example, if you want to create a position name called "search", you should add the following code into the index.php file where you want the search module to be displayed:
<?php if ($this->countModules('search')) : ?>
<div>
<jdoc:include type="modules" name="search" style="xhtml" />
</div>
<?php endif; ?>
<?php if ($this->countModules('search')) : ?>
<div>
<jdoc:include type="modules" name="search" style="xhtml" />
</div>
<?php endif; ?>
Free & Premium Joomla Templates
https://pcmshaper.com/
https://pcmshaper.com/
-
- Joomla! Intern
- Posts: 64
- Joined: Wed Dec 10, 2014 7:59 am
- Location: India
Re: Add Search box to header
Celinalim wrote:The Joomla version I'm using is 1.5.25. I want to add a search button at the bottom right of my header but I can't find the index.php that was mentioned. Can anyone help
you can find index.php file in /templates/your_template_name
-
- Joomla! Fledgling
- Posts: 4
- Joined: Tue Jun 21, 2016 1:42 am
Re: Add Search box to header
Shivika wrote:Celinalim wrote:The Joomla version I'm using is 1.5.25. I want to add a search button at the bottom right of my header but I can't find the index.php that was mentioned. Can anyone help
you can find index.php file in /templates/your_template_name
Am quite new to this version so when I log in to the admin site I see: Dashboard, Menus,Sections, Categories, Articles and Modules. I can't find the "template" button or whichever place to go into the template section Could you guide me through? Thank you soooo much. Really appreciate it!
- Per Yngve Berg
- Joomla! Master
- Posts: 30982
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: Add Search box to header
Extensions->Templates
If you do not see it, your Joomla user does not have Super-admin permissions.
If you do not see it, your Joomla user does not have Super-admin permissions.
-
- Joomla! Fledgling
- Posts: 4
- Joined: Tue Jun 21, 2016 1:42 am
Re: Add Search box to header
So would it still be possible for me to add a searchbox at the header section? Joomla! 1.5 version. Is there any other way?
- Templatemesh
- Joomla! Apprentice
- Posts: 44
- Joined: Wed Jun 25, 2014 6:40 am
- Location: Chennai, India
- Contact:
Re: Add Search box to header
Video tutorial for adding top header 'Search' box in position 'search'. You may look at this https://www.[youtube].com/watch?v=Vhvgd57IJEg
Free & Premium Joomla Templates
https://pcmshaper.com/
https://pcmshaper.com/
- Templatemesh
- Joomla! Apprentice
- Posts: 44
- Joined: Wed Jun 25, 2014 6:40 am
- Location: Chennai, India
- Contact:
Re: Add Search box to header
Please check tutorial url hereTemplatemesh wrote:Video tutorial for adding top header 'Search' box in position 'search'. You may look at this https://www.[[youtube]].com/watch?v=Vhvgd57IJEg
Free & Premium Joomla Templates
https://pcmshaper.com/
https://pcmshaper.com/