![]() |
Home |
Faculties & Divisions |
Search![]() |
![]() ![]() |
![]() ![]() |
![]() |
|
Generating NavigationStandard University of Adelaide webpages contain navigation with expanding sub-menus. This navigation, that generally appears on the left hand side of the pages, can be automatically generated from a text file that details the structure of the site. The advantage of this is that the navigation does not have to be maintained separately for each page, simplifying maintenance and consistency. There are two steps involved in creating navigation files. The first is to create a text file outlining the structure of a site's navigation and the second is to submit a request in WebAccess to create the navigation from the file. The navigation generation facility in WebAccess can also be used to create new sites or create pages within sites. Navigation Text FilesThe text files can contain a number of commands, the most commonly used of which is the link command. If you require more complicated navigation than that described below, please contact the Online Media Unit (web.services@adelaide.edu.au) for more information. The link command comprises the word link followed by the URL (relative or absolute) for the link and finally the text that is to appear in the navigation. Each link command must be entered on a separate line. The nested structure, showing sub-menus, is created by using a single space indent at the beginning of the line to represent a level of sub-menu in the navigation (these are shown as tabs in the sample below so they are clearly visible). Consider the example below: link index.html Site home The navigation that will appear on the home page of the site will display only the top level navigation, showing: If Staff is selected from this list, the navigation will display the staff submenu expanded, as follows: Similarly, selecting Research from the navigation and then Publications from the expanded sub-menu will show the publications submenu expanded in the navigation and all other submenus contracted as follows: The navigation files can be created or edited using a text editor such as notepad or wordpad. The main navigation text file for a site is a file called main_nav.nav, found in the top-level folder of the site. In addition to the link commands, the main_nav file may contain a command telling the system to include the contents of another navigation file when generating navigation for the site. That is, when creating the navigation files, the content of the specified include file should be included in place of the navinc command. This include has the following format navinc filename where filename is the navigation file to be included, for example if the include file is called site.navinc from the navigation folder, the navinc command will appear as navinc nav/site.navinc The included navigation files are generally stored in a folder within the site called nav/. In order to determine which navigation file to work on, first look at the main_nav.nav file in the top-level folder for the site. If that file contains one or more navinc commands, you will need to edit the contents of these included files to change your site's navigation. Using WebAccess to Generate NavigationOnce the navigation text files have been set up to reflect the navigation structure required for the site, the generate navigation commands in WebAccess can be used to create the site's navigation. From the Submit Requests page or the submit requests entry box on the Site Information page, selecting the option to generate navigation . This runs a program that takes the structure of the site from the navigation text files and creates navigation files, with an extension, .nhtml, containing the navigation code for University of Adelaide webpages. Each generated navigation file shows the current menu item highlighted and submenus expanded if they exist for the current menu item. Generate Navigation OptionsIn addition to creating the navigation files for the site, the text navigation files can be used to create a number of other elements that appear on University of Adelaide sites. The information in the navigation text files can be used to set up new pages or sections in a site and can even be used to create a whole new site. Selecting the option to generate html pages from nav from the Submit Requests page or the submit requests entry box on the Site Information page will create new pages, and folders if required, for the site. For a new site, all pages and folders specified in the navigation are created. If this option is run on an existing site, any new pages and folders referred to in the navigation are created without affecting any existing pages. Pages created in this way use the standard template for the site and have the page title and the page heading set to the text specified in the link command for that page. That is, the text that appears in the navigation menu to link to the page is the text that appears as the heading and at the top of the window in the browser. The breadcrumb trail that appears just above the footer information on all pages within a site is also created from the navigation text files. This trail links back through each level of the site, with a text the same as that in the navigation menu, appearing as a link for each level. These breadcrumbs are generated from the navigation text files by selecting the option to generate breadcrumbs from the Submit Requests page or the submit requests entry box on the Site Information page.
|