menu.gp
Current maintainer : | Max Maischein
|
Author(s) : | Max Maischein
|
Recipe homepage : | <none>
|
The documentation file was last modified on Sat Jul 22 19:49:58 2000.
menu.gp is a simple site navigation system.
Compatible Genpage Versions |
Version 1.0.3 and above.
menulink( aPagegloss, aDescription )
menulink() returns
<A HREF="gloss(aPagegloss)">aDescription</A>
if aPagegloss does result in an URL that does not link to the current page and it returns
<B>aDescription</B>
if aPagegloss results in an URL to the current page.
This is quite convenient to use in a navigation bar, where the current page will automatically
be displayed in bold and all other links will remain normal links.
aPagegloss must be an entry in your glossary that resolves to a local URL to
a page (that is, no "http://" at the start of the URL). Using the glossary for
page links helps you to keep all your references between pages in one easy to edit place.
First of all, the file menu.gp must be included in some content by using
<!-- _GP_ recipe( "menu.gp" ) -->
.
An example for a navigation bar in template.html is like follows (assuming
that template.html will be used to create both, the homepage and the filepage) :
<CENTER>
[
<!-- _GP_ menulink("ex_homepage", "Home") --> |
<!-- _GP_ menulink("ex_filepage", "Downloads") --> |
<!-- _GP_ menulink("ex_email", "Contact") -->
]
</CENTER>
|
Which will look like the following :
[
Home |
Downloads |
Contact
]
For the page with the filepage gloss, the same code will result in HTML that looks
like the following :
[
Home |
Downloads |
Contact
]
The menu separator (in this example "|") is not part of menu.gp !
It must be specified separately. This is, so that you could also use menu.gp in
another fashion, as a navigation bar to the left of your page :
<TABLE width="100%"><TR><TD width="80" bgcolor="#D0D0FF"><!-- Site Menu -->
<TABLE width="100%">
<TR><TD><!-- _GP_ menulink("ex_homepage", "Home") --><TD></TR>
<TR><TD><!-- _GP_ menulink("ex_filepage", "Downloads") --></TD></TR>
<TR><TD><!-- _GP_ menulink("ex_email", "Contact") --></TD></TR>
</TABLE></TD><TD valign="top" bgcolor="#F0F0C8">
And here goes the fabulous content of the page ... Who needs frames anyway ?
</TD></TABLE>
|
This would then look like this (never mind the color choices !):
|
And here goes the fabulous content of the page ... Who needs frames anyway ?
|
None known :)
This page generated using Genpage - Version: 1.0.7 on Fri Dec 18 17:45:49 2009
© Max Maischein
1999