[Catalyst] Relative links
Bill Moseley
moseley at hank.org
Wed Nov 9 22:59:55 CET 2005
On Wed, Nov 09, 2005 at 09:22:26PM +0000, Matt S Trout wrote:
> On Wed, Nov 09, 2005 at 01:02:08PM -0800, Bill Moseley wrote:
> > I originally was creating a $c->stash->{myself} entry for
> > self-referencing links in all my controllers. Seems like the only way
> > since Catalyst can't really know what action is the "self".
>
> As of 5.49, you can access the Catalyst::Action object for the current action
> via $c->action. Something like $c->action->attributes->{Path}[0] will work
> for any Path or Regex action.
That's all based on the action that matched. My situation is when
forwarding to another action. I guess I'd need it to seem like the
forwarded action is the action that matched.
--
Bill Moseley
moseley at hank.org
More information about the Catalyst
mailing list