<%once>;
my $widget = 'profile';
</%once>
<%perl>;
# Figure out where we are.
my ($section, $moe, $key, $id, $oid) = parse_uri($r->uri);

# Grab the ID from the URL.
$ARGS{id} = defined $id && ($id eq 'perm' || $id eq 'recip') ? $oid : $id
  unless defined $ARGS{id} && $ARGS{id} ne '';

# Record where we are.
set_state_data($widget, $key, $ARGS{id});

# Execute the dhandlers.
$m->call_next(%ARGS);
</%perl>
