views:

112

answers:

1

Hello all

I am having a problem using $html->link helper in my view. Consider this snippet...

/views/nodes/packages.ctp

<li><?php echo $html->link( "Package 1", array( "packages", "package1" ) )?></li>

Now when I click on the link, the address in address bar appears like

http://www.server.com/nodes/packages/packages/package1

Why is this happening? I haven't changed anything in my default routing configuration file.

Regards Vikram

+1  A: 

Let me answer this myself...

<li><?php echo $html->link( "Package 1", array( "controller" => "packages", "action" => "package1" ) )?></li>

I forgot to write the keys "controller" and "action". Silly me!

Regards

ShiVik