i have to remove "My account" & "Log out" links from some phtml pages.
for removing my account, i am using following code :
<marketplace_marketplaceaccount_myproductslist>
<reference name="top.links">
<remove name="account_link"/>
</reference>
</marketplace_marketplaceaccount_myproductslist>
for removing Login and log out , i am using following code :
<marketplace_marketplaceaccount_myproductslist>
<action method="removeLinkByUrl">
<url helper="customer/getLoginUrl"/>
</action>
</marketplace_marketplaceaccount_myproductslist>
but both are not working
Update :header.phtml
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@magentocommerce.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Magento to newer
* versions in the future. If you wish to customize Magento for your
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category design
* @package base_default
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
*/
/**
* @var Mage_Page_Block_Html_Header $this
*/
?>
<div class="Manoj">
<div class="Ma">
<div id="top_head">
<div class="header_top">
<div class="header_top_link">
<?php echo $this->getChildHtml('store_switcher_header') ?>
<?php echo $this->getChildHtml('currency') ?>
<?php echo $this->getChildHtml('store_language') ?>
<?php echo $this->getChildHtml('topLinks') ?>
</div>
</div>
<p class="welcome-msg"><?php echo $this->getChildHtml('welcome') ?> <?php echo $this->getAdditionalHtml() ?></p>
</div>
<div id="main_header">
<div class="header-container">
<div class="header">
<!--<div class="grid_7 alpha">-->
<div class="logo">
<div class="Header_logo">
<?php if ($this->getIsHomePage()):?>
<h1 class="logo"><strong><?php echo $this->getLogoAlt() ?></strong><a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>" class="logo"><img src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" /></a></h1>
<?php else:?>
<h1 class="logo"><a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>" class="logo"><strong><?php echo $this->getLogoAlt() ?></strong><img src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" /></a></h1>
<?php endif?>
</div>
<!--</div>-->
<!--<div class="grid_17 omega">-->
<div class="header_search">
<?php echo $this->getChildHtml('topSearch') ?>
</div>
<div class="div_link-cart">
<?php echo $this->getChildHtml('cart_sidebar');?>
</div>
<!--</div>-->
</div>
<div class="clear"></div>
<?php echo $this->getChildHtml('topContainer'); ?>
</div>
</div>
<div class="container_menu">
<div class="inner_menu">
<?php echo $this->getChildHtml('topMenu') ?>
</div>
</div>
</div>
</div>
</div>
<p id="back-top"><a href="#top" title="<?php echo $this->__('Back to Top') ?>"><?php echo $this->__('Back to Top') ?></a></p>
<style>
ul.solidblockmenu li a {
border-right: 2px solid #333;
color: #fff;
display: block;
float: left;
font-size: 14px;
height: 51px;
line-height: 38px;
padding: 0 25px;
text-align: center;
text-decoration: none;
width: 198px !important;
}
</style>
local.xml
<?xml version="1.0" encoding="UTF-8"?>
<layout>
<default>
<action method="unsetChild"><name>catalog.compare.sidebar</name></action>
</default>
<checkout_cart_index>
<reference name="header">
<block type="page/header" name="header">
<action method="setTemplate"><template>checkout/cart/cart_header.phtml</template></action>
</block>
</reference>
</checkout_cart_index>
<checkout_onepage_index>
<reference name="header">
<block type="page/header" name="header">
<action method="setTemplate"><template>checkout/cart/checkout_header.phtml</template></action>
</block>
</reference>
</checkout_onepage_index>
<marketplace_marketplaceaccount_myproductslist>
<action method="removeLinkByUrl"><url helper="customer/getAccountUrl"/></action>
<action method="removeLinkByUrl"><url helper="customer/getLogoutUrl"/></action>
</marketplace_marketplaceaccount_myproductslist>
</layout>
Best Answer
use this to remove account and logout