|
|
 |
 |
 |
manilaSuite.staticRendering.patchLocalURLs
Postscript: There were so many bugs in this script, that I eventually abandoned trying to fix it and wrote my own version - which can be found in my public domain root at manilaExtras.patchlocalURLs.
Manila does not support Scalable Content. This is the ability to render a single content page in multiple formats or to mutiple destinations using templates and the ftpSite parameters; it is a standard feature of the underlying html suite upon which Manila is based.
This patch is one of a series to the static rendering of Manila that restores that ability. One of our clients used that ability to excellent effect in his 2 version Glasgow West End website which is manitained in Manila and rendered in 2 versions.
Manila Managing Editors can use the "ManilaFixer Plugin" to maintain additional templates and ftpSites for their websites.
Amended Script
| |
local (pta = html.getPageTableAddress ()) |
| |
local (adrNewsSite = pta^.newsSite) |
| |
local (adrManilaSite = manilaSuite.staticRendering.getManilaSiteAddress ()) |
| |
local (dynamicUrl = adrManilaSite^.["#ftpSite"].url) |
| |
local (staticUrl = pta^.ftpSite^.url) |
| |
local (dynamicUri, staticUri) |
| |
local (dynamicServer, staticServer) |
| |
local (suffix = string.lower (manilaSuite.staticRendering.getSuffix ())) |
| |
bundle //get the dynamic and static uris |
| |
on filterUrl (url) //translate url for static rendering |
| |
local (ix = string.patternMatch ("<a href=\"", string.lower (s))) |
| |
htmlText = htmlText + string.mid (s, 1, ix - 1) |
| |
s = string.delete (s, 1, ix - 1) |
| |
ix = string.patternMatch (">", string.lower (s)) |
| |
local (link = string.mid (s, 1, ix - 1)) |
| |
else «recover mess and report error 8/12/06, 4:43:55 PM by DAB |
| |
ix = string.patternMatch ("</a>", string.lower (s)) |
| |
htmlText = htmlText + string.mid (s, 1, ix + 3) |
| |
htmlText = htmlText + ("<!-- error Converting:" + err + "-->") |
| |
s = string.delete (s, 1, ix + 3) |
Relative to Frontier version 9.7b10
|