i want to show custom url parameter in page created via module
what is did i created a module to show page with custom page
issue is how to pass and show parameter in url like product id of parent product
With my module i am able to open url with dummy content: like below
abc.com/related
i want to pass and show parameters like
abc.com/releted/productid/11
Below is code of my module MY_Related
1: app\code\local\MY\Related\Block\Index.php
<?php
class MY_Related_Block_Index extends Mage_Core_Block_Template{
}
2: app\code\local\MY\Related\controllers\IndexController.php
<?php
class MY_Related_IndexController extends Mage_Core_Controller_Front_Action{
public function IndexAction() {
$this->loadLayout();
$this->getLayout()->getBlock("head")->setTitle($this->__("Titlename"));
$breadcrumbs = $this->getLayout()->getBlock("breadcrumbs");
$breadcrumbs->addCrumb("home", array(
"label" => $this->__("Home Page"),
"title" => $this->__("Home Page"),
"link" => Mage::getBaseUrl()
));
$breadcrumbs->addCrumb("titlename", array(
"label" => $this->__("Titlename"),
"title" => $this->__("Titlename")
));
$this->renderLayout();
}
}
3: app\code\local\MY\Related\etc\config.xml
<?xml version="1.0"?>
<config>
<modules>
<MY_Related>
<version>0.1.0</version>
</MY_Related>
</modules>
<frontend>
<routers>
<related>
<use>standard</use>
<args>
<module>MY_Related</module>
<frontName>related</frontName>
</args>
</related>
</routers>
<layout>
<updates>
<related>
<file>related.xml</file>
</related>
</updates>
</layout>
</frontend>
<global>
<helpers>
<related>
<class>MY_Related_Helper</class>
</related>
</helpers>
<blocks>
<related>
<class>MY_Related_Block</class>
</related>
</blocks>
</global>
</config>
4: app\code\local\MY\Related\Helper\Data.php
<?php
class MY_Related_Helper_Data extends Mage_Core_Helper_Abstract
{
}