My view often needs to generate complex links for chained actions.
Does anyone have a better way of doing this then recreating the link
generators in the controller?
$c->stash->{generate_link_edit} = sub {
my $vin = shift;
$c->uri_for_action(
'/auth/company/lot/vin/edit'
, [
$c->stash->{chained_company_id}
, $c->stash->{chained_lot_id}
, $vin
]
, ()
);
};
$c->stash->{generate_link_vehicle_add} = sub {
$c->uri_for_action(
'/auth/company/lot/inventory/add'
, [
$c->stash->{chained_company_id}
, $c->stash->{chained_lot_id}
]
, ()
);
};
I'm speaking fairly abstract, how do you generate links in views to
controllers with chained actions?
--
Evan Carroll - [email protected]
System Lord of the Internets
web: http://www.evancarroll.com
ph: 281.901.0011
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/