Archive of UserLand's first discussion group, started October 5, 1998.

Static page rendering from DG

Author:Tommy Sundström
Posted:9/1/1999; 8:00:29 AM
Topic:Static page rendering from DG
Msg #:10384
Prev/Next:10382 / 10385

For reliability and speed I need to render my pages to static pages and ftp it over to a server.

Now they are stored (and managed) in a discussion group.

I have a script by Matt Neuburg, that will switch from static to dynamic rendering or vice verse, from one of the mailing lists in may.

Now I wounder if this is the "state of the art" on this subject, or if there is other scripts/texts that I should know of before starting to adopt my site. I'm greateful for pointers.

Here is Matts mail:

>>I have one site that I want to use dynamicly while editing, but then render >>to files and serve in traditional maner.

Amazingly, you can't - not without changing the site rather drastically each time you switch rendering methods. Unless, that is, you are willing to tinker with UserLand's scripts. I am, of course. This is what the whole "Rendering a site both ways" argument was about, over on Frontier-Users last month. I repeat my conclusions, i.e., this is what you need to do in order for the identical self-same site to render both ways:

--

All right then: let me summarize what I've discovered so far. In the site's prefs, add flrender and spaceGif. To your site's firstFilter, add these lines:

try { if adrpagetable^.responder == "default" { adrpagetable^.imageextensions = false; adrpagetable^.fileextension = ""}}

Now, in html.refglossary, where it says:

if html.inResponder (adrPageTable) { path = string.popSuffix (path) + ".wsf"};

add this:

try if adrpagetable^.responder == "default" { path = string.popsuffix(path)}}

Then, in html.getPath, where it says:

if html.inResponder (adrPageTable) { return (fname + ".wsf")}

*before* that, add this:

try { if adrpagetable^.responder == "default" { return fname}}

Finally, in html.getPath again, where it says:

if fileExtension == "" { fileExtension = html.getPagePref ("fileExtension", adrDest, adrPageTable)}

add this:

try { if adrpagetable^.responder == "default" { fileExtension = ""}}

There may be other changes needed as well, but for the sites I've experimented with so far, that suffices to make them work both ways. If I learn more, I'll let you know. m.






This page was archived on 6/13/2001; 4:52:20 PM.

© Copyright 1998-2001 UserLand Software, Inc.