Jennifer
Jennifer

Reputation: 1852

How to redirect to other action in cakephp2 with jquerymobile?

I have a problem here and I thought some pro's here can help me out.

Currently, I made a website with cakephp2 and have implemented jquery mobile to it. The problem is that the link such below doesn't work. Whenever, I try to use the link it shows up a yellow dialog box that says "Error loading page" .

<a data-rel="back">Return</a> <?php echo $this->Html->link('Home',array('action'=>'index'),array('data-icon'=>'home','data-iconpos'=>'notext)));?></div>

Upvotes: 2

Views: 56

Answers (1)

Sadikhasan
Sadikhasan

Reputation: 18600

<?php echo $this->Html->link('Home',
  array(
        'controller'=>'your_controller',  //Write here controller name
        'action'=>'index'),
 array(
        'data-icon'=>'home',
        'data-iconpos'=>'notext')));   //Here you missing single quote
?>

Upvotes: 1

Related Questions