even better...that seems like a more cake-like method than my concat operator trick
On May 4, 9:44 pm, brian <[email protected]> wrote: > You can also pass '#' as an extra param: > > $html->link( > 'View More Photos', > array( > 'controller'=>'listings', > 'action'=>'view', > $id > '#' => 'anchor' > ) > ); > > On Mon, May 4, 2009 at 5:55 PM, JamesF <[email protected]> wrote: > > > hey there i'm a big fan of verbose linking but i was having a problem > > linking to a named anchor in the target page > > figured it out before i posted my question so figured i would share. > > > code sans named anchor link: > > echo $html->link('View More Photos', array('controller'=>'listings', > > 'action'=>'view', $id); > > > outputs :http://mysite.com/controller/action/id > > > try this to link to the anchor: > > > echo $html->link('View More Photos', array('controller'=>'listings', > > 'action'=>'view', $id . '#anchor'); > > > output:http://mysite.com/controller/action/id#anchor --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
