Changing the home button to go to other directory

Started by rubix123, January 25, 2010, 04:18:51 AM

Previous topic - Next topic

rubix123

How can I change the "Home" button to go to a different directory? Like if you look at the top of this site the home button goes to http://www.simplemachines.org/ and then the forum goes to http://www.simplemachines.org/community/index.php where can I make this change?

phantom5

are you adding a front page like a portal?

I know you can change the line below $current_action = 'home'; in your index.template.php file in your theme folder but I'm not sure how to load a URL in the code

rubix123

yes im using simple portal which is located in the public_html/ folder and the forum is in public_html/forum folder

iGate

if i understand correctly you want to change the button "Home" to redirect somewhere else? if that is so follow the steps below. if that is not the case, do you mean you want to add a "Home" button? or is it something else you want to do, i'm not quite sure.

Find:

// Show the [home] button.
   echo   '<li><a href="', $scripturl, '">' , $txt[103] , '</a></li>';


replace with:

// Show the [home] button.
   echo   '<li><a href="YOUR NEW DIRECTORY URL HERE">' , $txt[103] , '</a></li>';


If you don't want it to say "Home" anymore use this version:

// Show the [home] button.
   echo   '<li><a href="YOUR NEW DIRECTORY URL HERE">DIRECTORY TITLE</a></li>';


naturally replace YOUR NEW DIRECTORY URL HERE and DIRECTORY TITLE with whatever you want.
if you have any problems, feel free to come back and ask. Also remember to create a  BACKUP first before ever editing your files.




greyknight17

rubix123, has this issue been resolved now? Did you try using the code modification provided?

Advertisement: