smlogo picture
 
fatpage picture
 

Object Info:

Type: script
Size: 12K
Updated: 12/10/97
 

renderFat
datedLink
Border
structuredNP
siteContents
navBar
pageList
pageTable

siteContents

Page Updated: 12/10/97
Now part of the webExtras v 1.5 suite.

Introduction

The siteContents macro was inspired by the outlineSite macro that ships with Frontier. Like outlineSite, siteContents builds an html "contents outline" of links to pages on your site. Unlike outlineSite, however, siteContents generates links based on an existing nextPrevs outline. This give you a great deal of control over the appearance the contents outline.

For example, pages are listed in the order that they appear in the nextPrevs outline, not in alphabetic order by title or object name. You can control how much of the site is shown by collapsing and expanding portions of the nextPrevs outline. You can even use different nextPrevs outlines to display the contents of other parts of the site or even other sites.

The siteContents macro works with the same directives as the outlineSite macro. For example, you can specify subtext to show beneath a link in the contents outline by adding a #subtext directive to that page. You can also use the #siteOutlineSubtextFont and #siteOutlineHeadFont directives to control the heading and subtext fonts used in the contents outline. For more information on these directives, check out the in the Site Outline and NextPrev Discussion Frontier Web Tutorial by Matt Neuburg.

The siteContents macro works with two additional directives, #tableName and #exclude.

In typical operation, the siteContents macro, acts like the outlineSite macro and uses the object name when listing a subtable. Alternatively, the siteContents macro allows you to provide a name for a subtable by using the #tableName directive. In example 1, the user.websites.ESD.examples subtable contains the directive #tableName "Example Applications". As a result, "Example Applications" is used instead of "examples".

Also, you can exclude pages from the content outline by using the #exclude directive. Pages that contain #exclude NPadr (where NPadr is the address of a nextPrevs outline) will not be listed when that outline is generated by the siteContents macro.

In its simplest form siteContents will produce a outline of links that is nearly identical to the one produced by the outlineSite macro.

Example 1
siteContents():
About ES Designs
News & Views
Products & Services
  Example Applications
  Stuff to Download
  addressList
  listCommands
  POPtoCS
  webTools for Frontier
  webScheduler
  formObjects
  autoSave
Tutorials
Links Elsewhere

In the above example the nextPrevs outline shows the following structure:

user.websites.ESD.index
	user.websites.ESD.about
	user.websites.ESD.news
	user.websites.ESD.products
		user.websites.ESD.examples
		user.websites.ESD.download.index
			user.websites.ESD.download.addressList
			user.websites.ESD.download.listcommands
			user.websites.ESD.download.poptocs
			user.websites.ESD.download.webtools.index
			user.websites.ESD.download.wsannounce
			user.websites.ESD.download.formobjects
			user.websites.ESD.download.autosave
	user.websites.ESD.tutorials
	user.websites.ESD.links

By expanding or collapsing the levels of the outline, you can show or hide different portions the site.

Example 2
siteContents(NPadr:@user.websites.esd.tools.nextPrevs2):
About ES Designs
  Thomas R. Clifton, Ph.D, R.G.
News & Views
Products & Services
  Example Applications
  Stuff to Download
Tutorials
Links Elsewhere

In this example I used a copy of the nextPrevs outline that shows the following structure:

user.websites.ESD.index
	user.websites.ESD.about
		user.websites.ESD.cvs.trc
	user.websites.ESD.news
	user.websites.ESD.products
		user.websites.ESD.examples
		user.websites.ESD.download.index
	user.websites.ESD.tutorials
	user.websites.ESD.links

Both the outlineSite macro and the default form of the siteContents macro do not show the top level of the site. If you want to show the complete site structure including the top level, use the showTopLevel parameter.

Example 3
siteContents(showTopLevel:true):
[Home]
  About ES Designs
  Thomas R. Clifton, Ph.D, R.G.
  News & Views
  Products & Services
  Example Applications
  Stuff to Download
  Tutorials
  Links Elsewhere

Details

siteContents v1.5b1. See script comments for version history

The siteContents macro uses six parameters in building an outline of links. The syntax is:

siteContents (tableadr, NPadr, maxwidth, indentpixels, showTopLevel, glossTitles)

tableadr is the address of the subtable containing the pages that will be included in the contents outline. tableadr defaults to the root table of the page being rendered.

NPadr is the address of the nextPrevs outline that you are using to build the site contents outline. Note, any outline build by structuredNP (or flatNP) can be used. It does not have to be named nextPrevs. This allows you to build and use multiple outline structures (see Example 2 above). NPadr defaults to the address of the nextPrevs outline stored in html.data.page.nextPrevs.

maxwidth is a number value that controls the maximum cell width of items in the html table that forms the contents outline. It defaults to 400.

indentpixels is a number value that controls the how many pixels to indent each sublevel of the contents outline. It defaults to 25.

showTopLevel is a boolean value that controls whether the top level of the site is shown or not. Example 3, above shows how this parameter affects the contents outline. The default is false to match the output of the outlineSite macro.

glossTitles is a boolean that controls whether the navigation bar is build from glossary entries as titles or as object names. Since the nextPrevs outline lists object names, you need to resolve these to page titles to work with glossary entries generated by the stock Frontier pageFilter. glossTitles allows for this resolution. The default is true.

The siteContents macro builds the contents outline based on a structured nextPrevs outline. The order which items appear in the nextPrevs outline determines the order that links are shown. Your links do not have to be in alphabetic order.

You may take a nextPrevs outline generated by Frontier's "Build nextPrev List..." and add structure to it, or you may use the webExtras v 1.5 suite's "Build Structured NP..." command (which will do most of the work for you). You can also use the structuredNP script, to generate a structured outline of your site. The outline structure does not have to mimic the site structure (though it is a little hard to imagine a why you would build an outline structure that wasn't at least a little similar to the site structure).


This is a fat web page containing user.html.macros.siteContents. This script is approximately 12K in size. In Frontier 4.2.3, choose the Get Page Data command from the Scripts menu to copy the script [user.html.macros.siteContents] into your object database. In Frontier 5a22, save the page to disk as html source, and then open it in Frontier using the "Open..." command in the File menu. More info on fat web pages is available here.

[Home] / Products & Services / Stuff to Download / webTools for Frontier

< Prev | Next >

by Tom Clifton, © 1997 ES Designs
email: tclifton@es-designs.com