Gossamer Forum
Home : Products : DBMan SQL : Discussion :

adding extra pages

Quote Reply
adding extra pages
An introduction to this thread is here

Is it possible to add extra pages? This would be useful for adding help and information pages which are only visible to registered users and which they can view without logging off.

Many thanks for any help / suggestions.
Tim Ault
Oxford UK
Quote Reply
Re: [timbo] adding extra pages In reply to
Can you change the home subroutine a litte bit like?

sub home {
#---------------------------------------------------------------------------
my $self = shift;
my $msg = shift;
$msg = ($self->_check_pers()) ? '' : $self->_language('PER_FAILURE') if ( !$msg );

my $pg = $self->{cgi}->{pg} || 'home.html';
return ($pg, {
header => $self->_language('HEA_HOME'),
msg => $msg
});
}


Now you can use db.cgi?do=home&uid=default&pg=template_name to display a page.

TheStone.

B.
Quote Reply
Re: [TheStone] adding extra pages In reply to
Stone,

Thanks for this.

I put your code into Home.pm, replacing the home subroutine.

In Edit Templates, I created a template called newhome.html.

Then I tried :

http://secondserve.co.uk/cgi-bin/db.cgi?do=home&uid=default&pg=newhome

But I don't see the new home page. What am I doing wrong please?

thanks
Tim Ault
Oxford UK
Quote Reply
Re: [timbo] adding extra pages In reply to
You've missed .html Wink

TheStone.

B.
Quote Reply
Re: [TheStone] adding extra pages In reply to
So the link should be:

http://secondserve.co.uk/cgi-bin/db.cgi?do=home&uid=default&pg=newhome.html

That doesn't work either. It should display a custom page, if I've followed your instructions correctly.
Quote Reply
Re: [timbo] adding extra pages In reply to
Can you send me the login info to access the admin panel via email? I will have a look at it.

TheStone.

B.
Quote Reply
Re: [TheStone] adding extra pages In reply to
That's now working well, thanks.