Gossamer Forum
Home : General : Perl Programming :

Re: Dynamic pages using templates?

Quote Reply
Re: Dynamic pages using templates? In reply to
 
Sagacity? Is that anywhere near MegaCity1? Smile

I reckon we'll have to start a new thread if this goes on. Don't sweat it about taking my time though, if I didn't have it I wouldn't be here. It's as much a learning experience for me as it is for you, but as I've mentioned before on this board, I don't like just creating stuff for people, I prefer to let them create it themselves and help them when they come across problems.

Anyway, those scripts you pointed me to operate in much the same way as buildpage.cgi, so that has no real bearing on the situation. I started throwing something together for you last night, but I still reckon you should install dbMan on your server, if only to make it easier for you to create and administer the whole setup.

The thing I'm creating can work with the data file you create with dbMan and as you get more comfortable with dbMan you could have the whole thing control your site, in much the same way I use it on the site I showed you before. This way you (eventually) get exactly what you want, and you learn a bit in the process.

You will need to decide what route you want to go. How quickly do you want to do this? If you're in no hurry, take your time and go the dbMan way. Anyway, either way you'll need to create a data file, in this format:

id|name|longname|inventor|manufacturer|chase|type

Just add or remove whatever you require. id will be a numerical id for the record (might make certain functions easier later), name will be a short name for the record (say adana or caxton), to make it easier to access the record with a nice short url. longname will be the proper name for the press and the rest can be what you want. If you have empty fields, don't just skip them, leave them empty, like this:

4|alert|Alert Press| |Gorham & Co.| |Platen jobber

You don't need to store your image names in the data file, the easiest way to get the images is to copy them and store them in another directory, renaming them to the value of name (i.e. alert.jpg). This way, you have one less field in your database to worry about, although you can have the field with the image URL if you wish. With the content, you can do it two ways. You can do it in the same way as the images, or you can have the html in your database, although the source of your html pages might look a little manky. I do it in the same way as the image files, but I haven't tried it the other way. I'll have to ask JPDeni about that.

So my suggestion to you is to get dbMan, configure it with whatever fields you want (Remember to think to the future. Might you want to add other fields later? It doesn't matter if some of the remain blank remember) and install it on your webserver. Then start adding your records and when you get stuck come back to this site, pop into either the dbMan installation or discussion forums and we can get you onto the next step.

Cheers,
adam
Subject Author Views Date
Thread Dynamic pages using templates? ecn 8965 Apr 23, 1999, 10:36 AM
Post Re: Dynamic pages using templates?
dahamsta 8713 Apr 23, 1999, 2:16 PM
Post Re: Dynamic pages using templates?
ecn 8722 Apr 23, 1999, 7:09 PM
Post Re: Dynamic pages using templates?
dahamsta 8732 Apr 24, 1999, 4:14 AM
Post Re: Dynamic pages using templates?
ecn 8738 Apr 26, 1999, 6:56 PM
Post Re: Dynamic pages using templates?
dahamsta 8722 Apr 27, 1999, 1:26 AM
Post Re: Dynamic pages using templates?
ecn 8752 Apr 27, 1999, 10:24 AM
Post Re: Dynamic pages using templates?
dahamsta 8711 Apr 27, 1999, 3:18 PM
Post Re: Dynamic pages using templates?
ecn 8715 Apr 27, 1999, 4:55 PM
Post Re: Dynamic pages using templates?
dahamsta 8791 Apr 28, 1999, 8:11 AM
Post Re: Dynamic pages using templates?
ecn 8716 Apr 28, 1999, 8:39 PM
Post Re: Dynamic pages using templates?
dahamsta 8749 Apr 29, 1999, 1:07 AM
Post Re: Dynamic pages using templates?
WilHatfield 8781 Feb 27, 2000, 11:58 PM
Post Re: Dynamic pages using templates?
Stealth 8751 Feb 28, 2000, 6:20 PM
Post Re: Dynamic pages using templates?
WilHatfield 8760 Mar 1, 2000, 7:27 PM
Post Re: Dynamic pages using templates?
Stealth 8711 Mar 1, 2000, 7:32 PM
Post Re: Dynamic pages using templates?
WilHatfield 8723 Mar 4, 2000, 6:02 PM