Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8399987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:26:53+00:00 2026-06-09T21:26:53+00:00

A cart dropdown plug-in I’m using has the following XML and I’m having trouble

  • 0

A cart dropdown plug-in I’m using has the following XML and I’m having trouble moving it to top links.

<?xml version="1.0"?>
<layout version="0.1.0">
    <default>
        <reference name="head">
            <action method="addCss"  ifconfig="cartdrop/general/enabled"><stylesheet>css/cartdrop.css</stylesheet></action>
            <action method="addJs"  ifconfig="cartdrop/general/enabled"><script>lib/jquery-1.4.2.min.js</script></action>
            <action method="addJs"  ifconfig="cartdrop/general/enabled"><script>lib/cartdrop.js</script></action>
        </reference>

     <reference name="top.container">
            <!--<action method="setTemplate" ifconfig="cartdrop/general/enabled"><template>cartdrop/template/header.phtml</template></action>-->

<block type="core/template" name="cartheader_sidebar" template="cartdrop/cartheader.phtml">         
    <block type="checkout/cart_sidebar" name="cart_sidebar" template="checkout/cart/sidebar.phtml" before="-">
        <action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/sidebar/default.phtml</template></action>
        <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/sidebar/default.phtml</template></action>
        <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/sidebar/default.phtml</template></action>
        <block type="core/text_list" name="cart_sidebar.extra_actions" as="extra_actions"/>
    </block>
</block>

        </reference>
    </default> 
</layout>

I’ve tried changing the reference name to reference name="topLinks" and reference name="top.Links"

I’ve also tried copying the block and pasting it in local.xml under <reference name="top.links"> and putting it in page.xml but to no avail.



  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T21:26:55+00:00Added an answer on June 9, 2026 at 9:26 pm

    It should be <reference name="top.links"> as the attribute said -> reference NAME

    The problem why it is not displayed is:
    – Look at the definition of top.links -> <block type="page/template_links" name="top.links" as="topLinks"/>
    – Then go to Mage/Page/Block/Template/Links.php

    class Mage_Page_Block_Template_Links extends Mage_Core_Block_Template
    {
        ...
    
        protected function _construct()
        {
            $this->setTemplate('page/template/links.phtml');
        }
    
        ...
    }
    

    Now we know that top.links extend from core/template.
    For those blocks which extend from core/template require a template (simple isn’t it),
    it will display everything inside the template (in your case, the template is page/template/links.phtml)

    For a template, to be able to render its child, it should explicitly call getChildHtml

    <?php echo $this->getChildHtml(); ?> -> will render all child under it

    <?php echo $this->getChildHtml('cartheader_sidebar'); ?> -> will render child with alias/name cartheader_sidebar

    It means if you want cartheader_sidebar to be displayed in top.links, you need to put <?php echo $this->getChildHtml('cartheader_sidebar'); ?> in page/template/links.phtml

    PS: I don’t check your layout, I assume it is already correct

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a dropdown option box in my CS-Cart install that has dynamically created
I am developing shopping cart for my project and i'm having trouble on how
I'm attempting to create a cascading dropdown based on the Knockout.js Cart example but
Trying to setup some validation on the add to cart button for the dropdown
I have made a cart and the cart has remove item button, but the
I'm creating shopping cart and I'm having one problem: When someone orders an item
For my shopping cart I'm using a bit of javascript to update my select
I have a cart table which has a relation to a product table that
I have a shopping cart that displays product options in a dropdown menu and
I am using shopping cart icon showing number of products in cart. but when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.