I think it will be a solution

$html->link('View More Photos','/listing/view/id#anchor');

Thanks,
Mohsin

On Tue, May 5, 2009 at 7:44 AM, 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
> >
> > >
> >
>
> >
>


-- 
--~--~---------~--~----~------------~-------~--~----~
Thanks,
Mohsin Kabir
--~--~---------~--~----~------------~-------~--~----~

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to