Jump to content

Change the header


Recommended Posts

Instead of having the typical header that contains your logo, login, language, currency, etc., I want to creat a php file that I can do whatever I want with and than put that as a header. I tried doing the smarty include that consists of the following:

{include_php file="/path/to/somefile.php"}



and

{php} 
include("/path/to/somefile.php");
{/php} 




Neither of them work... I was also thinking that I can make a module to do this but I dont know the first thing about making a module... Has anyone successfully tried this either as a include or as a module?

I like the idea of having a seperate php file to edit that will show as a header. Any help is greatly appreciated.

Link to comment
Share on other sites

could you not just add the changes you want to the header.tpl, and if you have currency or blockuser modules installed via admin>>modules, just style those (tpl files in modules) also or add additional html.

I just did not see the benefit of adding a new module, unless it needs to do something like return data from the database

I am not a php programmer, but I guess you could also add {include file=$tpl_dir./mytemplate.tpl} to the header and then just create the file you want (php and HTML) and save as a new tpl file in your themes. It may be that is all required, if its specific to one site and single language, but I am not sure so someone else may respond and say "yes, the include is all you need if you create your own tpl"

Link to comment
Share on other sites

I guess I just have had a lot of trouble getting the modules to go where I want them. I find that instead of adding the module and trying to move it over, its easier for me to create the php and add the code for the module within the php. This allows me to put it anywhere I want. I have tried to move the modules but I was having a lot of trouble even when I mod the header.tpl or the css. The "include" script will only allow a tpl file but I dont know how to create a tpl file because I havent learned how smarty tags work.

I did end up getting the header the way I want but I ended up pushing the modules down so far that I cant see them under the main page. My header logo image spans the whole top of the page so I guess that forced the module code to go down further. Now I want it to overlap the header logo but I cant. If I had it as PHP, than I could setup tables and put everything where I want it.

Link to comment
Share on other sites

But you can do that in your themes template and CSS. You could make header graphic a background image and then position your other elements and modules, If these are absolutly positioned (within a relatively positioned header) with a higher z-index for example they will sit on top of your header graphic also and allow you to place them where you want

Link to comment
Share on other sites

×
×
  • Create New...