Archive for June 20th, 2006
always use html->link
Always use $html->link when creating links. This html helper appends your base path to the beginning. This is helpful when your settings is in a subfolder.
Example, your webroot is in ‘http://cakensoda.wordpress.com/cake’. Without using the html link helper, your links will only be ‘/controller/action’ instead of ‘/cake/controller/action’
I learned this in a not-so-friendly way bec i used the a link tag before to form my links. But when my webroot was moved to a subfolder, every link didnt work!
Also, if you cannot use $html->link due to some special reasons, I use the $html->base to append my base path.
Add comment June 20, 2006