Scoop -- the swiss army chainsaw of content management
Front Page · Everything · News · Code · Help! · Wishlist · Project · Scoop Sites · Dev Notes · Latest CVS changes · Development Activities
Scoop Box Exchange - Show Box: section_display 1.00

Author: theantix [Info]

Description:

This box allows a section to be displayed through its own op, allowing sections to have their own templates.

Box Code:

# For this to be useful, create a new op with the same name as your section. The make your new op call this box, and the op will make the section look just like |rootdir|/section/foo -- except that now you can assign a custom template to it if you wish.

my $section = $ARGS[0];
$S->param->{section} = $section;

$S->{UI}->{BLOCKS}->{subtitle} = $S->{SECTION_DATA}->{$section}->{title};

if( $S->have_section_perm('hide_read_stories', $S->cgi->param('section')) ) {
$S->{UI}->{BLOCKS}->{subtitle} = '';
}

$S->{UI}->{BLOCKS}->{CONTENT} = $S->frontpage_view('section');

return;
Display: Sort:
Menu
· create account
· faq
· search
· report bugs
· Scoop Administrators Guide
· Scoop Box Exchange

Scoop Site Scroller: Get one yourself!
Smokedot
It's 4:19... do you know where your bong is?

Login
Make a new account
Username:
Password:

Hosted by ScoopHost.com Powered by Scoop
All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest © 1999 The Management

create account | faq | search