Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Pulling field value dynamically into static page

Quote Reply
Pulling field value dynamically into static page
Hi All

Okay, I hope I explain this right.

What I want to do is build static pages, BUT I want to make a few pieces of data in link.html be pulled dynamically each time the page is called.

For example, if I include a Price field in link.html, I want that to get pulled fresh each time the page is called in case I change the price one day to the next, but not have to rebuild the site.

So, my question is: Is there a way to build static pages but still pull certain fields dynamically (like using ssi) ??

Also, if I display, say, 12 items per page and each item has 4 dynamic fields, is that too many? Would this be too hard on the server?

The reason that I like static pages is that overall they are easier on the server and are very search-engine friendly.

Thanks very much. Smile Smile

------------------------------------------

Last edited by:

DogTags: Jul 19, 2002, 4:24 AM
Quote Reply
Re: [DogTags] Pulling field value dynamically into static page In reply to
In general, you could use SSI calls to include dynamic content in a static page. You could call page.cgi?p=link_price, make a template link_price where you would put the price of the item (calculated by a global) etc etc.

However, if you want to do 48 of these includes on one page, you will have a very slow page, and I am almost completely sure that a completely dynamic page would be much faster, certainly if you are not under mod_perl.

Alternatively, you could maybe use php pages, and then do a quick database lookup to get those prices.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Pulling field value dynamically into static page In reply to
Thanks, yogi. Yeah, I kinda thought it would be slow as a slug. I think what I'm gonna do is have a static home page, but the rest dynamic.

In fact, what would be really nice is if LinksSQL could build a only a static home page (to display updated categories), but to have the rest as dynamic. The prob with using the dynamic mode is that I still have to supply some sort of static home page.

Thanks for your suggestions and wisdom, yogi !! Smile

------------------------------------------

Last edited by:

DogTags: Jul 19, 2002, 6:27 AM
Quote Reply
Re: [DogTags] Pulling field value dynamically into static page In reply to
BTW, I think it wouldn't be too hard to have some rewrite rules and globals (like for the forum) in such a way that the URLs look static, but actually everything is served dynamically. I.e. all requests for www.foo.com/bar would be redirected (without changing the URL) to www.foo.com/cgi-bin/page.cgi?g=bar

This has probably been discussed before...

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Pulling field value dynamically into static page In reply to
Yeah, I've got to look into the rewrite stuff some more. Actually, I was thinking that a low-tech way of doing it would be to have a refresh=0 type of index page, and then redirect to the dynamic url. Might you have any idea which method - rewrite or refresh - would be easier on the server and faster? Any browser problems?

Many thanks, yogi !! Smile

------------------------------------------
Quote Reply
Re: [DogTags] Pulling field value dynamically into static page In reply to
you might want to try a index.shtml file with only one line:

Code:
<!--#exec cgi="/path_to_cgi-bin/scriptname.cgi" -->

rewrite is faster but comes with a learning curve (though I've found it to be some pretty cool stuff), but this is quick and dirty.
Quote Reply
Re: [Aki] Pulling field value dynamically into static page In reply to
Thanks, Aki ! Smile

------------------------------------------