Написал в шаблоне
<?php $quote = $this->getQuote() ?>
<?php if ($quote->getStatus()==0) $this->_forward('noRoute') ?>
<?php if ($quote->getStatus()==1) {?>
<h1><?php echo Mage::helper('freaks_quotes')->__('View quote "%s"', $quote->getName()) ?></h1>
<h4><?php echo Mage::helper('freaks_quotes')->__('Quote`s id "%s"', $quote->getId()) ?></h4>
<h4><?php echo 'Quote`s status: "Yes"' ?></h4>
<p><?php echo '<img src="'.$quote->getImage().'" height="200"\>'; ?></p>
<h4><?php echo "Content:</h4>".$quote->getDscr() ?>
<?php } ?>Выдает ошибку:
Invalid method Freaks_Quotes_Block_Quote_Content::_forward(Array
(
[0] => noRoute
)
)
В блоке у меня
<?php
class Freaks_Quotes_Block_Quote_Content extends Mage_Core_Block_Template
{
protected function _construct()
{
$this->setTemplate('freaks/quotes/quote/view.phtml');
}
public function getQuote()
{
return Mage::getModel('freaks_quotes/quote')->load($this->getQuoteId());
}
}
Возможно, надо добавить или перегрузить функцию _forward в Freaks_Quotes_Block_Quote_Content, как это можно сделать?

Вход
Регистрация
Помощь
Тема закрыта

