Programmer man
Programmer man

Reputation: 393

Zend link Button

How can one create a link to a particular action, tried this method below but its not working properly, bare in mind I also have a folder countaing the controller, admim/controller/action

<button type="button"><a href="<?php echo $this->url(array('controller' =>'smme', 'action' => 'client'))?>">Previous</a></button>

Thanks in advance

Upvotes: 1

Views: 475

Answers (1)

doydoy44
doydoy44

Reputation: 5772

For example, you can do something like that:

$button = new Zend_Form_Element_button('button');
$button->setAttrib('id', 'bouton');
$button->setLabel('Previous');
$button->setAttrib('onClick', "parent.location='" . Zend_Controller_Front::getInstance()->getBaseUrl() .'/smme/client' ."'");

Upvotes: 1

Related Questions