Add Search box to header

Everything to do with Joomla! 1.5 templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Locked
ETR9
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Thu Sep 10, 2009 8:22 am

Add Search box to header

Post by ETR9 » Thu Sep 10, 2009 8:26 am

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!

User avatar
OOmNezar
Joomla! Ace
Joomla! Ace
Posts: 1869
Joined: Mon Sep 07, 2009 3:18 am

Re: Add Search box to header

Post by OOmNezar » Thu Sep 10, 2009 9:34 am

overlap it to top menu
coffee & smoke just fine
OOm Nezar

ETR9
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Thu Sep 10, 2009 8:22 am

Re: Add Search box to header

Post by ETR9 » Thu Sep 10, 2009 9:41 am

wakjaer wrote:overlap it to top menu
But then the search box is at the top middle of my header, not the bottom right, like I want.

User avatar
Alextampa
Joomla! Guru
Joomla! Guru
Posts: 557
Joined: Fri Jan 09, 2009 3:16 pm
Location: Tampa

Re: Add Search box to header

Post by Alextampa » Thu Sep 10, 2009 3:08 pm

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;}

ETR9
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Thu Sep 10, 2009 8:22 am

Re: Add Search box to header

Post by ETR9 » Thu Sep 10, 2009 9:41 pm

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.

ETR9
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Thu Sep 10, 2009 8:22 am

Re: Add Search box to header

Post by ETR9 » Thu Sep 10, 2009 10:11 pm

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?

User avatar
OOmNezar
Joomla! Ace
Joomla! Ace
Posts: 1869
Joined: Mon Sep 07, 2009 3:18 am

Re: Add Search box to header

Post by OOmNezar » Fri Sep 11, 2009 12:21 pm

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>
coffee & smoke just fine
OOm Nezar

User avatar
Alextampa
Joomla! Guru
Joomla! Guru
Posts: 557
Joined: Fri Jan 09, 2009 3:16 pm
Location: Tampa

Re: Add Search box to header

Post by Alextampa » Fri Sep 11, 2009 12:24 pm

<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.

nils99
Joomla! Intern
Joomla! Intern
Posts: 56
Joined: Wed Jul 16, 2008 5:18 pm
Location: Berlin, Germany
Contact:

Re: Add Search box to header

Post by nils99 » Tue Sep 15, 2009 4:15 pm

thanks a lot!!!
great post, i finally know how to put in a new position, thanks alex!
:pop

llit
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Fri Oct 31, 2008 10:47 pm

Re: Add Search box to header

Post by llit » Tue Sep 22, 2009 4:13 am

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?

crompton
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Sat Sep 26, 2009 12:04 am

Re: Add Search box to header

Post by crompton » Sun Sep 27, 2009 8:21 am

Thanks for this post---very helpful!

Mahaj
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Sat Sep 26, 2009 3:40 pm

Re: Add Search box to header

Post by Mahaj » Sun Sep 27, 2009 6:37 pm

ahh thanks its help in some ways

bigshoegames
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Oct 08, 2009 6:26 pm
Location: Los Angeles, CA
Contact:

Re: Add Search box to header

Post by bigshoegames » Thu Oct 15, 2009 11:30 pm

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;}
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!

User avatar
OOmNezar
Joomla! Ace
Joomla! Ace
Posts: 1869
Joined: Mon Sep 07, 2009 3:18 am

Re: Add Search box to header

Post by OOmNezar » Sat Oct 24, 2009 7:55 am

Make sure to mark this discussion as SOLVED !!!!!
coffee & smoke just fine
OOm Nezar

Celinalim
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Tue Jun 21, 2016 1:42 am

Re: Add Search box to header

Post by Celinalim » Tue Jun 21, 2016 4:09 am

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 :( :( :( :(

User avatar
Templatemesh
Joomla! Apprentice
Joomla! Apprentice
Posts: 44
Joined: Wed Jun 25, 2014 6:40 am
Location: Chennai, India
Contact:

Re: Add Search box to header

Post by Templatemesh » Tue Jun 21, 2016 5:37 am

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; ?>
Free & Premium Joomla Templates
https://pcmshaper.com/

Shivika
Joomla! Intern
Joomla! Intern
Posts: 64
Joined: Wed Dec 10, 2014 7:59 am
Location: India

Re: Add Search box to header

Post by Shivika » Tue Jun 21, 2016 5:42 am

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

Celinalim
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Tue Jun 21, 2016 1:42 am

Re: Add Search box to header

Post by Celinalim » Tue Jun 21, 2016 8:06 am

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!

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30813
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Add Search box to header

Post by Per Yngve Berg » Tue Jun 21, 2016 8:24 am

Extensions->Templates

If you do not see it, your Joomla user does not have Super-admin permissions.

Celinalim
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Tue Jun 21, 2016 1:42 am

Re: Add Search box to header

Post by Celinalim » Wed Jun 22, 2016 3:03 am

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?

User avatar
Templatemesh
Joomla! Apprentice
Joomla! Apprentice
Posts: 44
Joined: Wed Jun 25, 2014 6:40 am
Location: Chennai, India
Contact:

Re: Add Search box to header

Post by Templatemesh » Wed Jun 22, 2016 6:36 am

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/

User avatar
Templatemesh
Joomla! Apprentice
Joomla! Apprentice
Posts: 44
Joined: Wed Jun 25, 2014 6:40 am
Location: Chennai, India
Contact:

Re: Add Search box to header

Post by Templatemesh » Sat Jul 16, 2016 5:07 am

Templatemesh wrote:Video tutorial for adding top header 'Search' box in position 'search'. You may look at this https://www.[[youtube]].com/watch?v=Vhvgd57IJEg
Please check tutorial url here
Free & Premium Joomla Templates
https://pcmshaper.com/


Locked

Return to “Templates for Joomla! 1.5”