Scoop Box Exchange - Show Box: subsection_list 1.00
|
Description:
This box makes a list of links to the child sections (subsections) beneath the current section. If no current section, it makes a list of links to the default "top level" sections.
Box Code:
my $content;
my $section = $S->{CGI}->param('section');
if($section)
{
foreach ( keys %{$S->{SECTION_DATA}->{$section}->{children}} )
{
if(!$S->{SECTION_DATA}->{$section}->{children}->{$_}->{invisible})
{
$content .= "<br><a href=\"/section/$_\">$S->{SECTION_DATA}->{$_}{title}</a>";
}
}
if(!$content)
{
$content = 'No subsections';
}
} else
{
$content = 'Put a list of default section links in this space.';
}
return {content => "<font size=1>$content</font>"};
|
|
The OpenNIC |
Democratically operated Domain Name System; using Scoop since Jan. 2001. |
|
|
|
|