Posted on: 10/01/02 03:54am
By: James Fryer
I had a requirement for some pages of my site (under development).
This was to display a block of information about the topic, with the stories appearing below this.
I had various plans of how to do this but after seeing the "Staticpage on Frontpage" code I decided to adapt this slightly.
In the code below, if you have a topic named 'foobar', a static page labelled 'foobar' will be displayed before the news stories, if it exists.
if( empty($topic) )
{
$staticpage_title = 'frontpage';
}
else {
$staticpage_title = $topic;
}
$spsql = "SELECT sp_content,sp_label FROM {$_TABLES['staticpage']} WHERE sp_title = '$staticpage_title'";
$spresult = DB_fetchArray( DB_query( $spsql ));
if( $spresult['sp_label'] == 'nonews' )
{
$shownews = 'no';
}
$display .= $spresult['sp_content'];
Posted on: 10/01/02 10:33pm
By: MLimburg
Posted on: 10/03/02 01:37am
By: James Fryer
Posted on: 10/10/02 12:28pm
By: jimphelps
Posted on: 10/11/02 07:40am
By: jimphelps