Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Random Links - SSI for static pages

Quote Reply
Random Links - SSI for static pages
Hi All

I am using the random links global. Here is where you can find it:

http://www.gossamer-threads.com/...orum_view_collapsed;

If you post the random links tag on the homepage and use dynamic pages, the random links get rotated for each page view.

However, if you use static pages, you have to wait 'til the next build to rotate the random links.

Would there be a way to have the random links on static pages get rotated for each page view? Maybe by using an ssi call and some sort of randomizing thing?

Thanks very much for your help. Smile

DogTags
Quote Reply
Re: [DogTags] Random Links - SSI for static pages In reply to
Sure, see: http://www.gossamer-threads.com/...rum.cgi?post=158467;

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Random Links - SSI for static pages In reply to
Is it possible to do this with Javascript?

Our home page has many lists created by several different globals. The end result is that the page takes about 5 to 10 secs to build which is fine since I'm using static pages.

I would like only one of the random lists to be created dynamically each time a person loads the page.

Can I do this without PHP or SSI? I don't really want to change the URLs of our home page, and I also don't want the many other globals to be built dynamically either, so a Javascript refresh type of thing would work perfectly. I don't know if that's possible though since it would need access to the SQL database...

Thanks,

Bryan
Quote Reply
Re: [BryanL] Random Links - SSI for static pages In reply to
Hi,

When you do a build, you could have a global put into a Javascript function 10 or 15 random links, and then use Javascript to pick from those links a random one.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Random Links - SSI for static pages In reply to
This worked perfectly, thanks!

It's an ugly looking global that outputs the Javascript code and then uses a new link.html template to finish the Javascript, but it works great!

Thanks,

Bryan