Description:
This box is patterned after section_title, but adds the scoop_intro block to the front page and the content of the description you type in for each section (on the Section admin page) for section specific pages.
Box Code:
## START section_intro ##
my $title = 'Front Page';
my $content = '|scoop_intro|';
my $op = $S->{CGI}->param('op');
my $page_num = $S->cgi->param('page');
my $page = '';
if ($page_num && $page_num != 1) {
$page = "(page $page_num)";
}
if ($op eq 'section') {
my $section = $S->{CGI}->param('section');
unless($S->have_section_perm('hide_read_stories',$section)) {
$title = $S->{SECTION_DATA}->{$section}->{title};
} else {
$title = '';
}
}
if ($op eq 'section') {
my $section = $S->{CGI}->param('section');
unless($S->have_section_perm('hide_read_stories',$section)) {
$content = $S->{SECTION_DATA}->{$section}->{description};
} else {
$content = '';
}
}
return {'content' => "$content", 'title' => "|title_font|$title $page|title_font_end|" };
## END section_intro ##
|