% foreach $tab (sort keys %{$tabs}) { %} % if ($actions) { %}
[{'path'}%>"><% $tabs->{"$tab"}->{'title'}%>] % foreach my $action (sort keys %{$actions}) { % }
% if ($actions->{"$action"}->{'html'}) { <%$actions->{"$action"}->{'html'} |n%> % } else { <% $actions->{$action}->{'title'}%> % }

<%INIT> my ($tab); my $tabs = { A => { title => 'Open requests', path => 'SelfService/', }, B => { title => 'Closed requests', path => 'SelfService/Closed.html', }, C => { title => 'New request', path => 'SelfService/Create.html' } }; my $actions = { B => { html => $m->scomp('GotoTicket') } };