Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Something
- extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
- {
- public function render(Varien_Object $row)
- {
- $column_data = $row->getData(
- $this->getColumn()->getIndex()
- );
- return $this->getLayout()
- ->createBlock('something/adminhtml_renderer_link')
- ->setLink($column_data )
- ->_toHtml();
- }
- }
- ?>
- <?php
- class Something
- extends Mage_Core_Block_Template
- {
- protected function _construct()
- {
- parent::_construct();
- $this->setTemplate('something/link.phtml');
- }
- }
- ?>
- <?php
- $link = $this->getLink();
- ?>
- <?php if ($link): ?>
- <a href="<?php echo $link ?>" target="_blank"><?php echo $this->__('Click to view!'); ?></a>
- <?php else: ?>
- <?php echo $this->__('No link'); ?>
- <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement