Gossamer Forum
Home : Products : Gossamer Links : Discussions :

dynamic pages and page.cgi

Quote Reply
dynamic pages and page.cgi
Realizing 1) static pages can take up a lot of room fast, 2) static pages require waiting for periodic "build" commands to become available, and 3) the site is supposed to be as self-maintaining as possible, I've decided to look at going entirely dynamic.

As I understand it, dynamic pages take up little space, are instantly available upon approval (without a "build"), and require little in the way of maintenance.

I've looked all over, and cannot find anything that actually tells me how to make the site dynamic. Sure, I found the setting in the Build Setup page, but other than that I have a cryptic reference to page.cgi. I suspect I have to set my HTML links to point to page.cgi, passing specific arguments when a desired function is needed.

The big question: where can I find a list of valid page.cgi arguments for and their definitions, so I can make it humm? I see knowledgable people tossing them about like beer at a tailgate party, but nothing points me to anything that looks like proper documentation!

Alan Frayer
Don't just read the news - make the news!
Your World News - http://yourworldnews.frayernet.com
Quote Reply
Re: [afrayer] dynamic pages and page.cgi In reply to
If that means that you would never be building any static pages, then for your home page (obvioulsy an shtml) call your page.cgi?d=1
as a SSI

That should be it unless i misunderstood your query

HyTC
Quote Reply
Re: [HyperTherm] dynamic pages and page.cgi In reply to
You almost got me. The d=1 argument is one of the items I would need, but my approach to using page.cgi is a little more difficult... I am not just hopping on at the main menu, as d=1 would have me do.

I need to move from static html pages to specific features, such as search, add, or modify. I'm not as concerned about the forms being dynamic; in fact, as forms, they never do change. But I want the results of the work to be dynamic, so as to reduce storage requirements. This means the detailed pages need to be created as dynamic pages, and if the search page has to be dynamic to produce dynamic results, so be it.

It just seems to me that everything would be so much easier if someone published a list of the arguments page.cgi would accept, such as d=1 for dynamic pages.

Or is this supposed to be the point where someone says, "The answer, my friend, is blowin' in the wind... and probably in a book on CGI programming as well."

Alan Frayer
Don't just read the news - make the news!
Your World News - http://yourworldnews.frayernet.com
Quote Reply
Re: [afrayer] dynamic pages and page.cgi In reply to
Quote:
It just seems to me that everything would be so much easier if someone published a list of the arguments page.cgi would accept, such as d=1 for dynamic pages.

Or is this supposed to be the point where someone says, "The answer, my friend, is blowin' in the wind... and probably in a book on CGI programming as well."

You have it perfectly.
d=1 to page.cgi once in home page, everything follows this d=1 thereafter (unless you did changes in menu's)
index.shtml

How to get it in index.shtml to include the page.cgi?d=1 would definitely be there in a book on cgi :)

HyTC

Thanks
HyTC
==================================
Mail Me If Contacting Privately Is That Necessary.
==================================
Quote Reply
Re: [HyperTherm] dynamic pages and page.cgi In reply to
Ah... you see, I do not plan to use the Browse ability of Links SQL. I don't want browsing of the database. I want specific queries, resulting in specific links, each with their own detailed page. And I want the links and detailed pages displayed dynamically.

I believe I can get this from using the right arguments with page.cgi... only, I don't know what those arguments are! Are you saying page.cgi is so common as to be explained in a book on CGI?

Alan Frayer
Don't just read the news - make the news!
Your World News - http://yourworldnews.frayernet.com
Quote Reply
Re: [afrayer] dynamic pages and page.cgi In reply to
Hi,

I'm not sure what you are asking, but I actually wrote the detail_page.cgi script to fix/address this in Links 1.1x.

You might want to give it a try. ..../detail_page.cgi?ID=<%ID%>&d=1 is all you need to call it. If you don't pass in d=1, it will generate a dynamic "static" page. You need to make sure your static links work, in that case. The reason for that was to save both build time and storage space for very large sites, where any specific detail page may never even be accessed.

Later versions of page.cgi can do some of this, but it's more problematic, as page.cgi does a *lot* of other stuff detail_page.cgi doesn't even attempt. detail_page.cgi also can track "hits" to your detail pages separately from jumps to the site.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] dynamic pages and page.cgi In reply to
In Reply To:
You might want to give it a try. ..../detail_page.cgi?ID=<%ID%>&d=1 is all you need to call it. If you don't pass in d=1, it will generate a dynamic "static" page. You need to make sure your static links work, in that case. The reason for that was to save both build time and storage space for very large sites, where any specific detail page may never even be accessed.

Later versions of page.cgi can do some of this, but it's more problematic, as page.cgi does a *lot* of other stuff detail_page.cgi doesn't even attempt. detail_page.cgi also can track "hits" to your detail pages separately from jumps to the site.
I'm feeling dense... are you saying I should find those places in the templates that read .../detail_page.cgi?ID=<%ID%> and add &d=1 to get dynamic detail pages? Or should I be looking somewhere else?

Can I use search.cgi?d=1 and expect to get a dynamic return?

Where is all or any of this documented? I hate asking the stupid questions, but without full documentation, I don't know where to turn for answers.
.

Alan Frayer
Don't just read the news - make the news!
Your World News - http://yourworldnews.frayernet.com
Quote Reply
Re: [afrayer] dynamic pages and page.cgi In reply to
I may be being stupid ... but wouldn't mod_rewrite do this?

Basically, using a .htaccess file, to make all the static (looking) pages, run in dynamic mode (i.e with page.cgi).

Take a look at our site: http://www.ultranerds.com, where we make use of this (the only real static files, are images, and downloadable files Smile).

BTW: If this is what you are looking for, do a search for my username, and "mod_rewrite .htaccess". Several of my threads, with examples should come up :)

Hope that helps.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] dynamic pages and page.cgi In reply to
Interesting idea, and a possible fall-back I'll look into, but I have found (to my surprise) that if my original call into the web of GT .cgi files includes ?d=1 (for example, search.cgi?d=1), then all of the subsequent pages used in that session include the d=1 argument, and from what I can see, the pages are rendered dynamically.

I have a spot where I'll have to "double up" on the arguments, and will see if I can successfully pass &d=1 as part of that, but the initial results are very promising.

I'm still surprised there is no list of usable arguments floating about.

Alan Frayer
Don't just read the news - make the news!
Your World News - http://yourworldnews.frayernet.com
Quote Reply
Re: [afrayer] dynamic pages and page.cgi In reply to
No worries. Please note though, that running it all through the .cgi scripts (i.e page.cgi?d=1, add.cgi?d=1, modify.cgi?d=1, etc), will not be spidered that well by Google.

Quote:
I'm still surprised there is no list of usable arguments floating about.

There are if you look hard enough =) (I'm just about to leave for home, otherwise I would have a quick look now Frown).

Basically;

t=TEMPLATE_SET
d=1 || d=0 - dynamic page, 1=on, 0=off
g=something (i.e page.cgi?g=New, or page.cgi?g=Cat_Name)

Hope that helps :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] dynamic pages and page.cgi In reply to
Quote:
No worries. Please note though, that running it all through the .cgi scripts (i.e page.cgi?d=1, add.cgi?d=1, modify.cgi?d=1, etc), will not be spidered that well by Google.
Strangely enough, I'm one of the few who is not interested in having Links SQL content "Googled". The material in the database is somewhat proprietary, and we'd prefer if people visited the database through the main entrance, where they have to see the legal disclaimer. If loss of spidering is the principle drawback of the d=1 approach, I'm a happy camper!

Quote:
t=TEMPLATE_SET
d=1 || d=0 - dynamic page, 1=on, 0=off
g=something (i.e page.cgi?g=New, or page.cgi?g=Cat_Name)

The first two I have; the third doesn't mean anything to me. What is the effect of "page.cgi?g=New"? I'd rather not experiment on my installation.

It would be excellent if someone took all of those arguments and explanations and put them in a single document. I'm starting to get tired of the GF search engine! Tongue
.

Alan Frayer
Don't just read the news - make the news!
Your World News - http://yourworldnews.frayernet.com
Quote Reply
Re: [afrayer] dynamic pages and page.cgi In reply to
Quote:
The first two I have; the third doesn't mean anything to me. What is the effect of "page.cgi?g=New"? I'd rather not experiment on my installation.

I'm not quite sure what the 'g' is meant to mean, but basically, you can pass in either;

page.cgi?g=New;d=1
page.cgi?g=Cool;d=1
page.cgi?g=Detailed/1.html;d=1
page.cgi?g=Europe/Something/Subcat;d=1

...etc

So, in short... you can link to a category page, or the Cool/Pop/Rating pages.

Hope that helps.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!