Navigation System Tutorial for UgaiCGI
Navigation System Tutorial for UgaiCGI
The navigation system at Perpustakaan Nirkabel 2024 (2024 Wireless Library) is designed to be customizable by non-technical users who are unfamiliar with web interface design using HTML.
Open, Modify, Save
Users only need to modify a file named navigation.txt to tailor the menu to their needs. After making changes, save the file using the same name and location. When the router is restarted, the contents of navigation.txt will automatically be translated into the menu.
Structure
The structure of the menu is roughly as follows:
menu
├── A
├── B
│ ├── 1
│ └── 2
├── C
│ ├── 1
│ └── 2
└── D
Points A and D represent menus without sub-items. Points B and C, on the other hand, have sub-items. In the navigation.txt file, this structure is marked with hash tags (#) as shown below:
A
# B
## 1
## 2
# C
## 1
## 2
D
Links
The navigation menu consists of two parts: links and titles. The title is the text displayed on the web page. A link is the page that opens when the title is tapped. It is the text that appears in the browser bar when you navigate to a new page.
The link-title pattern in navigation.txt is as follows:
link, title
Example: If you want to create a title "Urban Sociology" to open a page with the link
http://1.2.3.4/ugai.cgi?dbkomugai&tags=urban sociology
then the text in the navigation.txt file should be:
dbkomugai&tags=urban sociology, Urban Sociology
The system will encounter issues if the link contains a comma (,). Therefore, replace any data items containing a comma if they are to be used as a link.
Menu Links
Now, let's integrate the above two components into the navigation system when entered into the navigation.txt file.
├── Home
├── Sociology
│ ├── Urban
│ └── Rural
├── Lessons
│ ├── Elementary
│ └── Middle School
└── Info
In the initial form (titles only), the contents of the navigation.txt file become:
Home
# Sociology
## Urban
## Rural
# Lessons
## Elementary
## Middle School
Info
If executed, the menu will not open any pages because no links are provided. Now let's complete it with links:
# db=komugai, Home
# Sociology
## tags=urban sociology&db=education, Urban
## tags=rural sociology&db=education, Rural
# Textbook Lessons
## tags=textbook elementary&db=ebooks, Elementary
## tags=textbook middle school&db=ebooks, Middle School
tags=about&db=komugai, Info
The menu contains three Calibre (db) data systems that users can access: komugai, ebooks, and education. Users are then guided to find items based on the existing tags in each database.
Limitations
Format and Characters
Link and Title Separation: Ensure that the separation between the link and title uses a comma, and there are no additional commas within the link or title itself as this will break the format and potentially cause errors in translating text code to HTML. Special Characters: Avoid using special characters in links and titles that might be interpreted by HTML or URLs, such as &, %, ?, =, #, < , >, and " unless it is absolutely necessary and you understand how to handle it, for example, by using URL encoding. Change all titles, keywords, authors if they contain the above characters.
Consistency of Hashes (#)
Ensure that each sub-item menu starts with the correct number of hashes: '# for menu titles with a dropdown.' '## for sub-items within that dropdown.' There are no #s for menu items that do not have sub-items and function directly as links without a title.
Link Format:
Ensure that the link entered is valid and comes from all text after the question mark: For example, a link:
http://192.168.1.1/ugai.cgi?db=ebooks&tags=high school textbooks
should be recorded in navigation.txt as
db=ebooks&tags=high school textbooks
or
tags=high school textbooks&db=ebooks
I hope this helps!