Advertisement

Where can I find joomla header file ?

General questions relating to Joomla! 2.5. Note: All 1.6 and 1.7 releases have reached end of life and should be updated to 2.5. There are other boards for more specific help on Joomla! features and extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Locked
Micdu Pree
I've been banned!
Posts: 27
Joined: Fri Aug 08, 2014 6:26 pm

Where can I find joomla header file ?

Post by Micdu Pree » Fri Aug 08, 2014 8:03 pm

I know header file is being called inside template->index.php file like

Advertisement
Victoria Simms
I've been banned!
Posts: 25
Joined: Thu Aug 07, 2014 8:26 pm

Re: Where can I find joomla header file ?

Post by Victoria Simms » Fri Aug 08, 2014 8:23 pm

Hi Micdu,

You should not hack core files, ever. Besides the possibility that you introduce a vulnerability the file, with your changes, will be overwritten when Joomla is updated. Sure, you can avoid updating but then you have to personally fix any vulnerabilities that are discovered and then fixed in future releases, or run a install with a known vuln.

Don't hack core files.

Why don't you tell us what it is you are trying to achieve? Why do you want to modify the content of head? There are, no doubt, far better ways to do it than modifying head.php.

Regards,
Victoria

Victoria Simms
I've been banned!
Posts: 25
Joined: Thu Aug 07, 2014 8:26 pm

Re: Where can I find joomla header file ?

Post by Victoria Simms » Fri Aug 08, 2014 8:28 pm

Try this,

Sometimes Its not recommended editing core files.

You can find the meta and title section of the Joomla sites.

libraries\joomla\document\html\renderer\head.php
contains a function fetchHead()

Hope it also helped...

Regards,
Victoria

Micdu Pree
I've been banned!
Posts: 27
Joined: Fri Aug 08, 2014 6:26 pm

Re: Where can I find joomla header file ?

Post by Micdu Pree » Mon Aug 11, 2014 3:20 pm

ok

Micdu Pree
I've been banned!
Posts: 27
Joined: Fri Aug 08, 2014 6:26 pm

Re: Where can I find joomla header file ?

Post by Micdu Pree » Mon Aug 11, 2014 3:21 pm

actually i tried this one but its not work properly pls send me another one

RedEye
Joomla! Ace
Joomla! Ace
Posts: 1460
Joined: Sat Jan 21, 2006 8:42 pm

Re: Where can I find joomla header file ?

Post by RedEye » Mon Aug 11, 2014 4:30 pm

Viktoria has given you the correct path to the head renderer file, however you should not override this file, clone it in your template folder and include it in your templates index.php or just create a new renderer for it.
Micdu Pree wrote:actually i tried this one but its not work properly pls send me another one
Question is: what did you try? Give some more informations and people can help you better...

User avatar
jackrabbit
Joomla! Ace
Joomla! Ace
Posts: 1473
Joined: Thu May 21, 2009 3:12 am
Location: Florida
Contact:

Re: Where can I find joomla header file ?

Post by jackrabbit » Mon Aug 11, 2014 8:22 pm

It appears micdu and victoria are one and the same. The same user asking and answering his own questions. The status indicates 'banned'

For the benefit of those who searched similar query
Head Stuff Without Hacking

Code: Select all

//get the document renderer and set the variable for duplicate use
$document = JFactory::getDocument();

//set metadata $name, $content
$document->setMetaData( 'viewport', 'width=device-width; initial-scale=1.0; minimum-scale=1.0;' );

//load a stylesheet before javascripts
$document->addStyleSheet('mystyle.css');

//load javascript
$document->addScript('script.js');

//load a stylesheet or any kind of script last
$document->addCustomTag('<link rel="stylesheet" href="template.css" type="text/css" />');

//add inline style
$document->addStyleDeclaration('body {background: red;}');

//add inline javascript
$document->addScriptDeclaration('$(function(){});');
Reset Joomla super user password and username simply | http://cmsenergizer.com/website-energy- ... d-remotely

Advertisement

Locked

Return to “General Questions/New to Joomla! 2.5”