php - Adding a page link in CakePHP -


i'm trying add page link in cakephp using:

<?php echo $html->link('home', '/notes/index');?> 

it doesn't seem output proper link.

what i'd want this:

<a href="/cake/cake_startab/notes/index/" alt="home">home </a> 

how can this?

you'll want use url array

<?php echo $html->link('home', array('controller'=>'notes','action'=>'index')); ?> 

this work you. not able use absolute path :)

check out manual page, http://api.cakephp.org/class/html-helper#method-htmlhelperlink


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -