Gossamer Forum
Home : Products : DBMan : Customization :

Multiple Databases Different Rec Layout

Quote Reply
Multiple Databases Different Rec Layout
Let me preface this post with this: I have searched the forum - if I missed a post, please forgive me and point me toward the post.

I have a fledgling database of pilot resumes in html.pl modified with Carol's User Friendly (severely bastardized) & Short/Long display. - Works great. I have just created a database of jobs - totally different record layout and not relational. My intention is to share the password file between the two db - which seems to be the easy part.

I am a bit lost at this point. Do I use the existing html.pl, and create separate Add/Modify/Delete screens for the different record layout of the Jobs database? Or do I create a separate html_jobs.pl, praying fervently that I maintain a homogenous look to the site - not to mention the updating nightmare? Is there another alternative - like pulling out the common parts (top of page, my sidebar that contains the navbar info that will be common to both html pages, the footer)? Will I need to use the "switch" I have been readin g about in the relational db posts?

Thank you for any direction (yes, even the "This Way To Hell" instructions)


Valerie
http://www.ad-ink.com
Quote Reply
Re: Multiple Databases Different Rec Layout In reply to
You will need two seperate html.pl files (defined in each .cfg) but you can retain global formatting.

If you read the last comments of the friendly_html.pl introduction, you'll notice a section where Carol talks about making the pages coordinate looks.

All you need to do is cut all the common sections from the html.pl file (like html_page_top, etc...) and then place them in a new file called "format.pl"

chmod this new .pl file 644 and place it in the same dir as everything else and un-comment the line:
# require $db_script_path . "/format.pl";
in each html.pl

Good luck,

- Mark

Astro-Boy!!
http://www.zip.com.au/~astroboy/
Quote Reply
Re: Multiple Databases Different Rec Layout In reply to
(Mark, you're doing my job for me very nicely! Smile)

Valerie, you can also create other subroutines if you want to and place them in the format.pl file. Anything where the coding would be identical for the two html.pl files can go in there. Just be sure you start with

sub subroutine_name {

and end with

}

Refer to your subroutines in the script like:

&subroutine_name;



JPD