| filsa.net: Frontier / Scripts / Navigation Macros / Yahoo Paths |
|
|
UPDATED: Ready for Frontier 5!Yahoo PathsEasy navigation for your site. This macro creates Yahoo style paths based on your folder structure.
Take a look at the link bar at the top of this page. It was generated by the yahooPaths() macro. Nifty, isn't it? It reflects the organization of this site. If your organization of your folders(sub-tables) makes sense, this macro lets your users take advantage of that quickly and easily. It creates a line of links that reflects the position of the current page in your root, providing links to the default file in each subtable it's nested in, all the way out to the root table of the site. Using Yahoo Paths Here's a list of the parameters for this script. They are all optional: yahooPaths (prefix="", suffix="", divider = " | ", useFolderNames=true, adrTopTable=@root, caseConvert=true, usePageTitle=true) prefix and suffix let you insert HTML code before and after every element in the path. divider lets you choose what to put between elements in the path. {yahooPaths ("<i>","</i>")} generates Frontier | Scripts | Navigation Macros | Yahoo Paths useFolderNames: If true, it uses the folder names (sub-table names) to make up the path elements. It also capitalizes the first letter of the folder name and breaks apart inner case names. It defaults to true, you can see the results above. If it's false, it uses the title of the default page to build the path. So this: {yahooPaths ("<i>","</i>", useFolderNames:false)} generates Phil's Frontier Scripting Site | Phil's Script Archive | Navigation Macros | Yahoo Paths adrTopTable: lets you set the top table for yahooPaths. Sometime you want to use yahooPaths for just a portion of your site, not all the way up to the top. In that instance, set adrTopTable to the top table level that you want to include. This is optional, and should be an address. yahooPaths automatically stops (of course) at the top level of your site. YahooPaths automagically breaks apart foldernames into separate words if they have innerCase. The caseConvert param turns this on/off. Defaults to true. There was a bug where the last item of the yahooPath clickTrail was always was the page title, no matter what useFolderNames was set to. I actually prefer this, so in fixing the bug I made it an optional parameter. usePageTitle defaults to true, turn it off if you want to use the file name instead.
Notes Tue, Jan 19, 1999 at 3:35:26 PM
Wed, Apr 22, 1998 at 5:03 AM
|
||
View the Source: user.html.macros.yahooPaths |
|||
|
© copyright 1997-98 by Philip Suh. Comments are appreciated. This page last updated on 1/20/99; 10:39:46 AM. <http://www.filsa.net/frontier/scripts/NavigationMacros/yahooPaths.html> |
| filsa.net: Frontier / Scripts / Navigation Macros / Yahoo Paths |