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


Top Posts

Recent Posts

a

bakers

feeds

general

uncategorized

Archives

Recent Comments

reviews on About
vishal on CakePhp Coding Standards
Ezoteraa on new installation of cake: open…
lanamep on new installation of cake: open…
marthavos on new installation of cake: open…

 

June 2006
M T W T F S S
    Jul »
 1234
567891011
12131415161718
19202122232425
2627282930  

Meta