Embperl
view release on metacpan or search on metacpan
eg/web/menuleft.epl view on Meta::CPAN
[* no warnings "uninitialized" ; *]
[$ sub menuitem $]
[*
my ($url, $txt, $state, $tablebg, $ndx) = @_ ;
*]
<tr>
<td align="left" [$if $tablebg $]background="[+ $r -> {imageuri} +]/hintergrund-nav.gif"[$endif$]>
<table width="152" border="0" cellspacing="0" cellpadding="0">
<tr>
[$ if (defined($ndx)) $]
<td nowrap align="left" width=[+ $ndx * 12 + 2 +]> </td>
<td nowrap align="left" width=15><img src="[+ $r -> {imageuri} +]i-sub-[+ $state>1?($state>2?'on':'open'):'off' +].gif" width="11" height="11" vspace="6" hspace="5"></td>
<td nowrap align="left" width=[+ 125 - $ndx * 12 +]><a href="[+ $app -> languri ($r, $url) +]"><div class="cMenu">[+ $r -> gettext ($txt) +]</div></a></td>
[$else$]
<td nowrap with="152" height=22> [$ if $url $]<a href="[+ $app -> languri ($r, $url) +]">[$endif$]<span class="cMenu">[+ $r -> gettext ($txt) +]</span>[$ if $url $]</a>[$endif$]</td>
[$endif$]
</tr>
</table>
</td>
</tr>
[$ endsub $]
[$ sub menu $]
[*
my ($menu, $ndx, $top) = @_ ;
local $^W = 0 ;
*]
[$ foreach my $item (@{$menu}) $]
[$if $item -> {path} $]
[-
if ( $r -> {menuitems}[$ndx] eq $item)
{
menuitem (!$item -> {url}?$r -> {baseuri} . $item -> {relurl}:$item -> {url}, $item -> {menu}, $r -> {menuitems}[$ndx+1]?2:3, $top, $ndx) ;
menu ($item -> {sub}, $ndx + 1, 0) if ($item -> {sub}) ;
}
else
{
menuitem (!$item -> {url}?$r -> {baseuri} . $item -> {relurl}:$item -> {url}, $item -> {menu}, 0, $top, $ndx) ;
}
-]
<tr>
<td><img src="[+ $r -> {imageuri} +]linie-nav.gif" width="152" height="1"></td>
</tr>
[$ endif $]
[$endforeach $]
[$ endsub $]
[-
$r = shift ;
$app = $r -> app ;
-]
<table width="152" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<p> </p>
</td>
</tr>
<tr>
<td valign="top" width="100%" align="center"><img src="[+ $r -> {imageuri} +]EmbperlLogo.gif" width="74" height="74"border="0">
</td>
</tr>
<tr>
<td>
<p> </p>
</td>
</tr>
<tr>
<td><img src="[+ $r -> {imageuri} +]h_content.gif" width="152" height="19"><br></td>
</tr>
( run in 1.431 second using v1.01-cache-2.11-cpan-39bf76dae61 )