I input code

<div id="wowslider-container1">
<div class="ws_images">
<li><img id="wows1_0" title="1" alt="1" srcowave.com/media/wysiwyg/images/1.jpg" /></li>
<li><img id="wows1_1" title="123456" alt="123456" src="httpicrowave.com/media/wysiwyg/images/123456.jpg" /></li>
<li><img id="wows1_2" title="black" alt="black" src="http:/owave.com/media/wysiwyg/images/black.jpg" /></li>
<li><a href="http://wowslider.com/vi"><img id="wows1_3" title="fair" alt="bootstrowave.com/media/wysiwyg/images/fair.jpg" /></a></li>
<owave.com/media/wysiwyg/images/good.jpg" /></li>
<div class="ws_s">
<div><a title="1" href="#"><span><img alt="1" src="http:/media/wysiwyg/tooltips/1.jpg" />1</span></a> <a title="123456" href="#"><span><img alt="123456" src="httm/media/wysiwyg/tooltips/123456.jpg" />2</span></a> <a title="black" href="#"><span><img alt="black" src="httm/media/wysiwyg/tooltips/black.jpg" />3</span></a> <a title="fair" href="#"><span><img alt="fair" src="http:/<span><img alt="good" src="htcom/media/wysiwyg/tooltips/good.jpg" />5</span></a></div>
<div class="ws_script" style="position: absolute; left: -99%;"><a href="http://wowslider.net">jquery carousel</a> by WOWSlider.com v8.7</div>
<div class="ws_shadow">&nbsp;</div>

<script type="text/javascript" src="http:/skin/frontend/default/MAG090198_Layout2/js/wowslider.js"></script>
<script type="text/javascript" src="http:/m/skin/frontend/default/MAG090198_Layout2/js/script.js"></script>
<script type="text/javascript" src="hte.com/skin/frontend/default/MAG090198_Layout2/js/viewmore.js"></script>

and cms-homepage-content input

<reference name="head">
    <action method="additem">
<action method="additem">
<action method="additem">

to admin-CMS-homepage to add new java script.

The problem is, the new java script I entered works fine, but the original java script or xml files that are related to advanced menu are not running, resulting sub menu to not function properly.

What do you think is the problem?

1 Answer 1


Typo error, capital letters are relevant

additem should be addItem, as the method additem() does not exist in Head block class


 * Add HEAD Item
 * Allowed types:
 *  - js
 *  - js_css
 *  - skin_js
 *  - skin_css
 *  - rss
 * @param string $type
 * @param string $name
 * @param string $params
 * @param string $if
 * @param string $cond
 * @return Mage_Page_Block_Html_Head
public function addItem($type, $name, $params=null, $if=null, $cond=null)
    if ($type==='skin_css' && empty($params)) {
        $params = 'media="all"';
    $this->_data['items'][$type.'/'.$name] = array(
        'type'   => $type,
        'name'   => $name,
        'params' => $params,
        'if'     => $if,
        'cond'   => $cond,
    return $this;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.