space Baylys
Just practicing to pass the Turing test.
space
space
space
space
Developer for Hire!
space
addedValues Plugin
space

Home

What's new

Bayly.Root

Cornershop Plugin

Career

edutools Root

Enhancements

Interests

linguist Plugin

Manila

Patches

space

mainresponder

manilaData

manilamacros

manilaSuite

space
space

admin

backups

discuss

gems

getCanonicalSiteName

hierarchyPage

hosting

html

mail

member

members

news

plugins

prefs

referer

renderNewsPage

rpcHandlers

rpcUtils

search

sendMail

siteStructure

staticRendering

space
space

convertFilename

convertUrl

discussCallback

displayRenderButton

drawNavigatorWithFiltering

filters

getRelativePath

getSuffix

patchLocalURLs

renderHierarchyPage

renderHomePage

renderPage

space

storyList

space

system

Patches by Group

Papers

Sales

Sign My Guestbook

User(land) Relations.

Contact Address

Search Baylys

urlchains

space
Join Now
Login
space space space

manilaSuite.staticRendering.drawNavigatorWithFiltering

Userland made a design decision that statically rendered sites would never need upper or mixed case urls. This is not true in our experience, and we had to support the users choice of case for his urls.

This patch restores that ability by honouring the lowercasefilename directive (which in userland static Manila websites is always true).

The Manila Managing Editor can use the "ManilaFixer Plugin" to change this preference in his site.

Amended Script

on drawNavigatorWithFiltering (pta=nil)
  «Draw the navigator links. The current page should be disabled.
 unaltered lines omitted
 
  if pta == nil
 unaltered lines omitted
 
  local (adrNewsSite = parentOf (pta^.adrSiteRootTable^))
  local (adrManilaSite = parentOf (adrNewsSite^))
  local (htmlText = "")
  local (i)
  local (adrNavigator = @adrManilaSite^.["#navigator"])
  local (lowerUri = string.lower (pta^.uri))
  local (flEditor = manilaSuite.editors.editorialTest (pta))
  local (itemFormat, separatorFormat)
  local (itemCt = 0)
  local (flJavaScriptUsed = false)
  local (picturePreLoader)
  local (defaultFilename = manilaSuite.staticRendering.getDefaultFilename ())
  local (staticSuffix = manilaSuite.staticRendering.getSuffix ())
  local (staticDefaultFile = string.lower (defaultFilename + staticSuffix))
 
  local (dynamicUrl = adrManilaSite^.["#ftpSite"].url)
  local (staticUrl = pta^.ftpSite^.url)
  local (dynamicUri, staticUri)
  local (dynamicServer, staticServer)
 
  bundle //get the dynamic and static uris
 
  bundle //get the format for items and separators
 
  on add (s)
 unaltered lines omitted
 
  on addLink (url, linetext, adrItem) //add a link, enabling or disabling as needed
  on addDisabledLink ()
 unaltered lines omitted
 
  on addEnabledLink ()
 unaltered lines omitted
 
  local (lowerUrl = string.lower (url))
 
  bundle //if it's a dynamic-only link, link to the dynamic page
 
  «if lowerUrl contains "/discuss/" or lowerUrl contains "/stories/"
 unaltered lines omitted
 
  local (originalUrl = url)
  local (flLocal = false)
  bundle //translate url for static rendering
  «url = string.replace (url, dynamicUrl, staticUrl, false)
  «if (url == originalUrl) and (url beginsWith "http://")
 unaltered lines omitted
 
  url = string.replace (url, dynamicUri, staticUri, false)
  local (convertedUrl = url) //PBS 10/22/01: make sure static links are disabled properly
  if string.lower (convertedUrl) endsWith string.lower (staticSuffix)
 unaltered lines omitted
  convertedUrl = string.lower (manilaSuite.staticRendering.convertUrl (convertedUrl))
  if (string.lower (url) == convertedUrl)
 unaltered lines omitted
  else
  if url != originalUrl or (not (url beginsWith "http://")) //did the URL get filtered? It's local, add .html suffix.
  «url = string.lower (url)
  if html.getPref("lowercasefilenames", pta) //01/02/26, 20:36:00 by DAB
  url = string.lower (url)
  url = manilaSuite.staticRendering.convertUrl (url)
  flLocal = true
 
  if not flLocal
 unaltered lines omitted
 
  local (strippedPageName = string.lower (url))
  local (strippedUri = lowerUri)
  itemCt++
 
  if strippedPageName beginsWith "http://"
 unaltered lines omitted
 
  if strippedUri == strippedPageName
 unaltered lines omitted
 
  if strippedPageName endsWith "/" + staticDefaultFile
 unaltered lines omitted
 
  if defined (pta^.pathArgs) and pta^.pathArgs != ""
 unaltered lines omitted
 
  if strippedUri endsWith "/" + staticDefaultFile
 unaltered lines omitted
 
  if strippedUri contains "/" and not (strippedPageName contains "/")
 unaltered lines omitted
 
  «Add the link, enabled or disabled.
  if strippedUri == strippedPageName // was: if pta^.uri == pagename: PBS 5/21/99
 unaltered lines omitted
  else
 unaltered lines omitted
  return (true)
 
  bundle //compile the xml text if it's been modified
 
  for i = 1 to sizeOf (adrNavigator^.structure [1]) //loop through the links table
 unaltered lines omitted
 
  bundle //remove the last separator
 
  htmlText = manilaSuite.unTaint (htmlText) //there should be curly brace macros here
 
  bundle //strip in the rollover JavaScript
 
  return (htmlText)

Relative to Frontier version 9.7b10