Gossamer Forum
Home : Products : DBMan : Customization :

How can i add an extra page?

Quote Reply
How can i add an extra page?
I want to add an extra html page thats still within the database.

For example: i have a kind of online league, and the winners from each game earn points and they get to spend those points on skills etc. I still want to call up elements of the database, like username etc.

I have a page ready made but how do i put it in? Do i need to make an extra sub in the html.pl file?
Almost forgot i want to have a link to the page from the menu in the footer.


Thanks for your help, and its an excellent db package :)

Last edited by:

manic: Oct 1, 2002, 2:08 AM
Quote Reply
Re: [manic] How can i add an extra page? In reply to
Check out the "unofficial FAQ" maintained by LoisC at: http://webmagic.hypermart.net/dbman/ and look under "viewing" there will be good options.

To give you a quick answer on the following...

Q: I have a page ready made but how do i put it in?

A: You could put the following in your html.pl under "sub html_record" and/or " sub html_record_form" do something like (just above the final closing bracket "}" in the sub):
Code:
if ($in{'view'} eq "special") {print qq| your special code/secret page here |;}

Q: Almost forgot i want to have a link to the page from the menu in the footer

A: Under "sub html_footer" copy & paste another link like:
Code:
print qq!| <A HREF="$db_script_link_url&view_records=1&db_key=*&view=special">list all</A> ! if ($per_view);

You'll have to hack around with it until you get it like you want... to view a specific record (say #123) you'd replace db_key=* with ID=123 (of course that's if you're using ID as the key).

Good Luck!
(check out Lois' FAQ first - you might find a better alternative)