How does one remove the base href tag?

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
GDLTD
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Mon Oct 27, 2008 7:12 pm

How does one remove the base href tag?

Post by GDLTD » Wed Dec 17, 2008 9:20 pm

For some reason swfobject in conjunction with the base href tag is creating a nasty error in IE6. Is there a way I can remove it from within the template? I'd rather not touch the core files.

Thanks.

User avatar
kittymcooper
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Thu Aug 03, 2006 7:29 pm
Location: Fort Collins, CO, USA
Contact:

Re: How does one remove the base href tag?

Post by kittymcooper » Sun Dec 28, 2008 4:34 am

have a look at this discussion:
http://forum.joomla.org/viewtopic.php?f=428&t=268149

I think it covers the base causes of this issue

GDLTD
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Mon Oct 27, 2008 7:12 pm

Re: How does one remove the base href tag?

Post by GDLTD » Thu Jan 01, 2009 5:48 pm

Thanks, I saw that before I posted. In my case, the base href doesn't appear to be wrong. Especially so in this case as it's the home page so there's no directory to mess with.

User avatar
giribabuvpy
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Wed Jun 17, 2009 2:41 pm
Location: Bangalore
Contact:

Re: How does one remove the base href tag?

Post by giribabuvpy » Fri Sep 03, 2010 11:49 am

We can use this Plugin for remove base href tag.
http://extensions.joomla.org/extensions ... adata/7153
Hemanathagiribabu
http://valapady.com

NefroniK
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Sun Jan 15, 2012 6:40 pm

Re: How does one remove the base href tag?

Post by NefroniK » Fri Jan 20, 2012 8:05 pm

PLUGIN for REMOVING TAG?!
You have to be crazy people ...

User avatar
zuno
Joomla! Apprentice
Joomla! Apprentice
Posts: 28
Joined: Tue Feb 03, 2009 4:04 am
Location: Long Beach, California
Contact:

Re: How does one remove the base href tag?

Post by zuno » Mon Jan 23, 2012 7:49 am

To remove the base tag in the header simply add this to your template file (index.php)

Code: Select all

$this->base = '';
It will set the base element to nothing and therefor the base tag will not be rendered in the header.

Hope this helps. It drove me crazy!
Jonathan Lackey | creative director
http://zunostudios.com

johnmce
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Tue Apr 28, 2009 10:28 pm

Re: How does one remove the base href tag?

Post by johnmce » Tue Mar 27, 2012 5:16 pm

Probably not recommended but if other solutions here don't work and you want to hack the core the files you need are in libraries/joomla/document/html/renderer/head.php

Just comment out

Code: Select all

$strHtml .= $tab.'<base href="'.$document->getBase().'" />'.$lnEnd; 
around line 96
Please read the forum rules regarding the use of signatures: http://forum.joomla.org/viewtopic.php?f=8&t=65


Locked

Return to “Templates for Joomla! 1.5”