this is my config file in etc\module :
<?xml version="1.0"?>
<config>
<modules>
<Net_Toplinks>
<active>true</active>
<codePool>local</codePool>
<version>0.0.1</version>
</Net_Toplinks>
</modules>
</config>
then added this code in app\code\local\net\Toplinks\etc\congif.xml
<?xml version="1.0"?>
<config>
<modules>
<Net_Toplinks>
<version>0.0.1</version>
</Net_Toplinks>
</modules>
<global>
<blocks>
<net_toplinks>
<class>Net_Toplinks_Block</class>
</net_toplinks>
</blocks>
</global>
<frontend>
<layout>
<updates>
<net_toplinks>
<file>net_toplinks.xml</file>
</net_toplinks>
</updates>
</layout>
</frontend>
</config>
Added block file as block\Stores.php
<?php
class Net_Toplinks_Block_Stores extends Mage_Core_Block_Template {
public function addCustomLinks()
{
$parentBlock = $this->getParentBlock();
if ($parentBlock )
{
$text = 'casa';
//Top link Display Text
$url = ‘testmodule’;
$position = 3;
$parentBlock->addLink($text, $url , $text, $prepare=true, $urlParams=array(), $position , null, 'class="top-link-testmodule"');
}
return $this;
}
}
?>
& finally added this in mycustom-theme folder under \app\design\frontend\net\custom-theme\layout\net_toplinks.xml
<?xml version="1.0"?>
<layout>
<default>
<reference name="top.links">
<block type="net_toplinks/stores" name="stores_links">
<action method="addCustomLinks"></action>
</block>
</reference>
</default>
</layout>
Still no link is shown in top links. Currently it shows link in Myaccount dropdown.I want link outside dropdown next to or before Account.