i have created one news module . it is working fine..
http://domain.com/magento/news
this page is displaying all the news items. with title, content and date.
i want to make view more link for content when user click on view more link it will redirect user to specific newsitem page
http://domain.com/magento/news/newsitem-1
i created another controller newsitemController.php with following code :
public function infoAction(){
$this->loadLayout();
$this->getLayout()->getBlock('content')
->append($this->getLayout()->createBlock('news/newsitem') );
$this->renderLayout();
}
also created block name info.php with below code:
public function _prepareLayout()
{
return parent::_prepareLayout();
}
public function getnewsitem()
{
if(!$this->hasData('news')) {
$this->setData('news', Mage::registry('news'));
}
return $this->getData('news');
}
not getting output..
need help to get output.