Hot answers tagged

17

Im using Joomla 3.2, at the top of my tempate I put: $doc = JFactory::getDocument(); $dontInclude = array( '/media/jui/js/jquery.js', '/media/jui/js/jquery.min.js', '/media/jui/js/jquery-noconflict.js', '/media/jui/js/jquery-migrate.js', '/media/jui/js/jquery-migrate.min.js', '/media/jui/js/bootstrap.js', '/media/system/js/core-uncompressed.js', '/media/...


6

I finally found what seems to be the "correct" way to do this. Even if I used sendHeaders, the additional Content-Type was being added and that got returned as it was added later. I followed through the code and AbstractWebApplication.php sets the headers with this line: // Send the content-type header. $this->setHeader('Content-Type', $this->...


5

You can unset it in the template unset( $this->_scripts['/media/jui/js/mootools-core.js'], $this->_scripts['/media/jui/js/core.js']); This will remove the both JS files from the Header.


3

In Joomla 3.x, you can call JHtml::_('jquery.framework') in your template to load jQuery without Mootools. This loads jQuery in no conflict mode by default so if you need normal mode, just add a second parameter of false: JHtml::_('jquery.framework', false). http://docs.joomla.org/J3.2:Javascript_Frameworks


3

Default Joomla behaviour is to add scripts to the head element. Try looking where <jdoc:include type="head" /> appears in your template (under template/YOURTEMPLATE/index.php) - it may have been moved to the footer here. Likewise, it might be a plugin which is moving the scripts to the footer, so you might want to review which have been installed. A ...


3

Took a little digging but I see the issue https://github.com/joomla-framework/application/blob/master/src/AbstractWebApplication.php If you look at the setHeader function it does not actually set the header yet, it only gets it "ready" So what you need to do is simple $this->app->setHeader('Content-Type', 'application/json', true)->sendHeaders();...


2

You should probably be doing this in a system plugin using the onBeforeRender event. At this point in execution, the page is about to be rendered, so the scripts should be in place. Something like this: function onBeforeRender() { $doc = JFactory::getDocument(); $dontInclude = array( '/media/jui/js/bootstrap.min.js' ); foreach($doc->...


2

It is there and you can use it as per your needs and in combination with other options, like show title, category title, etc. For me it adds flexibility. It is good to have it there by default, because there are so many scenarios that something like this might be needed and it adds extra control and options. I remember once I was working on another e-...


2

If you want to avoid core hacks, you can use jQuery to remove the class attribute: jQuery( document ).ready(function($) { $(".icon-eye.thememanager").removeAttr("class"); }); This will leave you with only <span></span>. If what you're trying to do is change the class rather than removing it (e.g. to change the icon), you can use ....


1

Turns out I DID have the ScriptsDown plugin installed, although it didn't show up the first time I searched for it in my early exploration of this issue. I'm guessing I had a typo. Anyways, this was the issue. Disabling this plugin fixed my problem; thanks for your help!


1

There are numerous ways to customise something depending on something, so I can only answer by suggesting some ways to do some things. First of all, generally in Joomla one tries to do minimal coding in the template, and instead one uses component overrides and modules so that output can be managed in the admin interface. That being said, many templates ...


1

There's a sourcerer tag used in the facebook og tag generator. If you switch the view source you can see it like this: <meta property="og:description" content=" <!-- You can place html anywhere within the source tags --> <script language="javascript" type="text/javascript"> // You can place JavaScript like..." /> </head> The ...


1

No, I don't have another template - I know what I 'm talking about and this is about the Beez that comes with Joomla 3. I replaced the image with another of the same size and it's not looking bigger or isn't fitting. I am getting the exact same behavior as if I was using the personal image. The description of your problem is rather vague for us to ...


1

To expand on Lodder's answer, using JHtml::_('jquery.framework'); at the top of your component's views and before any other calls to your custom js, will ensure that jQuery will be loaded, before your other scripts, and only once - even if other extensions or the template have called it with the same method. Also it worths noting that JHtml::_('jquery....


1

Joomla adds it all over the place. Do a search for JHtml::_('jquery.framework'); in the core files and see how. The javascript frameworks do seem a bit messily implemented. There is some information about them here. https://docs.joomla.org/J3.x:Javascript_Frameworks The most common place seems to be in your component's view default.php file. A "what do ...


1

It's not up to the template or Joomla to load jQuery. You'll normally find jQuery being loaded on a lot of the default pages cause an extension does, however Joomla is not required to load it by default on every single page, therefore it's up to you. To load it, simple add: JHtml::_('jquery.framework'); in your component views.


1

Assuming that by "header image" you are NOT reffering to "Kiperowil" logo in header, but to trucks images in slider underneath, you can change them in 'Vinaora Nivo Slider' published in position-4. I have seen hundreds of slide-show extensions, but this one is new to me.


1

Ok, so the markup for the header isn't there at all, so we know it's not a CSS related issue. I'm going to have a guess and say it's most likely 1 of 2 things: 1: The header is a module. Therefore you need to ensure it's assigned to every page. Open the header module in the Module Manager, go to Menu Assignment, then select Show on all pages 2: Your ...


1

Not sure what do you mean with heading page. Regarding showing the title twice, I guess you have the options set to display the article title. In the options of that menu item, set article title to Not show. Other than that, it's possible that your template has overrides for the com_content, that manipulate the output of your article pages. To identify ...


1

The code is located in the following file on line 86 administrator\components\com_templates\views\templates\view.html.php You will see the following code: JToolbarHelper::title(JText::_('COM_TEMPLATES_MANAGER_TEMPLATES'), 'eye thememanager'); Please do bare in mind that changing this will be a core hack, so if this file is modified in a future Joomla ...


1

I've used this: foreach ($doc->_scripts as $script => $value) { if (preg_match('/media\/jui/i', $script)) unset($doc->_scripts[$script]); }


Only top voted, non community-wiki answers of a minimum length are eligible