normal Move links to mootools-core.js

More
7 years 4 months ago #8966 by Erick Gersdorf
Hello,

I would like to change the URLs of the following links
Code:
<script src="/media/system/js/mootools-core.js" type="text/javascript"></script> <script src="/media/system/js/core.js" type="text/javascript"></script> <script src="/media/system/js/mootools-more.js" type="text/javascript"></script>

The reason:
When updating Joomla 3.6.4 the dropdown menu does not work any more. Therefore I want
to move these javascripts into the template folder.

Unfortunatelly I cant find the source code:
Code:
<?php /** # mega_orthodontis - Mega Orthodontis Template For Joomla! 1.7 # author OmegaTheme.com # copyright Copyright(C) 2011 - OmegaTheme.com. All Rights Reserved. # @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL # Website: http://omegatheme.com # Technical support: Forum - http://omegatheme.com/forum/ **/ /**------------------------------------------------------------------------ * file: index.php 1.7.0 00001, March 2011 12:00:00Z OmegaTheme $ * package: Mega Orthodontis Template *------------------------------------------------------------------------*/ //No direct access! defined( '_JEXEC' ) or die; include_once(JPATH_ROOT . "/templates/" . $this->template . '/lib/splitmodules.php'); JHTML::_('behavior.framework', true); $doc = &JFactory::getDocument(); $doc->addScript(JURI::root().'/templates/'.$this->template.'/js/mega.script.js'); $doc->addScript(JURI::root().'/templates/'.$this->template.'/js/mega_menudropdown.js'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" > <head> <?php $menu =& JSite::getMenu(); if($menu->getActive() == $menu->getDefault()){ $home = true; }else{ $home = false; } ?> <jdoc:include type="head" /> <meta name="viewport" content="width=device-width; initial-scale=1; maximum-scale=1.0;" /> <link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/css/layout.css" rel="stylesheet" type="text/css" /> <link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/css/template.css" rel="stylesheet" type="text/css" /> <link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/css/typography.css" rel="stylesheet" type="text/css" /> <link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/css/customs.css" rel="stylesheet" type="text/css" /> <link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/css/menu.css" rel="stylesheet" type="text/css" /> <link href="http://fonts.googleapis.com/css?family=Open+Sans:700" rel="stylesheet" type="text/css" /> <!--[if IE 6]> <link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template?>/css/ie6.css" rel="stylesheet" type="text/css" /> <![endif]--> <!--[if IE 7]> <link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template?>/css/ie7.css" rel="stylesheet" type="text/css" /> <![endif]--> <!--[if IE 8]> <link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template?>/css/ie8.css" rel="stylesheet" type="text/css" /> <![endif]--> <?php if($this->countModules('news')) { $fnews = ''; }else{ $fnews = '_fn'; } ?> <?php if($this->countModules('right')) { $fright = ''; }else{ $fright = '_fr'; } ?> <script type="text/javascript"> jQuery(function($){ $( '.res-btn' ).click(function(){ $('.mega_main_menu').toggleClass('expand-nav') }) }) </script>

Could you please give me a hint where to change the path.

best Regards
erick

Please Log in or Create an account to join the conversation.

More
7 years 4 months ago #8967 by Kiên
Hello, thanks for using our template!
This is js mootool core of joomla, not template.
it was added from code: <jdoc:include type="head" />
So you can unset mootool with using:
Code:
<?php $doc = JFactory::getDocument(); unset($doc->_scripts[JURI::root(true) . '/media/system/js/mootools-more.js']); unset($doc->_scripts[JURI::root(true) . '/media/system/js/mootools-core.js']); unset($doc->_scripts[JURI::root(true) . '/media/system/js/core.js']); ?>
on head tag
The following user(s) said Thank You: Erick Gersdorf

Please Log in or Create an account to join the conversation.

More
7 years 4 months ago #8972 by Erick Gersdorf
Hi,

thank you for your answer. I deleted "JHTML::_('behavior.framework', true);" - remark did not work and added the Scripts.
The solutions looks like the following.
Code:
include_once(JPATH_ROOT . "/templates/" . $this->template . '/lib/splitmodules.php'); $doc = &JFactory::getDocument(); $doc->addScript(JURI::root().'templates/'.$this->template.'/js/mootools-core.js'); $doc->addScript(JURI::root().'templates/'.$this->template.'/js/core.js'); $doc->addScript(JURI::root().'templates/'.$this->template.'/js/mootools-more.js'); $doc->addScript(JURI::root().'templates/'.$this->template.'/js/mega.script.js'); $doc->addScript(JURI::root().'templates/'.$this->template.'/js/mega_menudropdown.js');

I have a different problem but will open a new thrad.

Please Log in or Create an account to join the conversation.

Time to create page: 0.278 seconds

About Growth

Innovative tech for eCommerce growth

Contact Info

Head: No. 3, 175/55 Lane, Lac Long Quan St., Nghia Do Ward, Cau Giay District, Hanoi City, Vietnam