Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

How do I ad a new link to the nav header? 
 
patriciac
Member
 
Total Posts:  40
Joined:  2010-05-30
 

When I open the header to modify it, it’s written in php, I can modify html pages easily but I don’t know much about php.

How can I find the related html page for the header??

Here is the code:
?>
<div class="header-container">
<div class="header">
<?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:?>
<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>
<?php endif?>
<p class="top-promo" title="<?php echo $this->__('Free Shipping on orders over 50$'); ?>"><?php echo $this->__('Free Shipping on orders over 50$'); ?></p>
<?php echo $this->getChildHtml('topMenu') ?>
</div>
<div class="quick-access">
<?php echo $this->getChildHtml('store_language') ?>
<p class="welcome-msg"><?php echo $this->getWelcome()?></p>
<?php echo $this->getChildHtml('topLinks') ?>
</div>
<?php echo $this->getChildHtml('topBar') ?>
<?php echo $this->getChildHtml('topContainer'); ?>
</div>

I basically need to change the quick-access div, not the css but the html, just ad a new link. Does anybody know how can I find this?

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
redhotrobbie
Jr. Member
 
Total Posts:  27
Joined:  2008-10-27
 

A dirty way to do it is change:

<?php echo $this->getChildHtml('topLinks') ?>
</div>

to:

<?php echo $this->getChildHtml('topLinks') ?>

<a href="page">page</a>

</div>

Your CSS may be messed up but you can prob do that yourself.

the links are probably coming from your layout folder - app > design > frontend > default > (theme)> layout

For example checkout link is in checkout.xml:
<reference name="top.links">
<block type="checkout/links" name="checkout_cart_link">
<action method="addCartLink"></action>
<action method="addCheckoutLink"></action>
</block>
</reference>

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top