| Program created
|| November 2007
| Program last touched
|| 17th August 2010
|| Finished, maintenance updates
A simple utility for static pages maintenance. Why load the webserver with dynamic pages only to create menu at runtime, when the structure is predetermined at site upload time? This program allows one to define a hierarchical menu and assign pages and links to each item. Then it manages the files used in the site - updates the menu in all pages. Actually this website is written with the help of WebComposer.
The program uses HTML comment tags to insert / modify contents in a HTML file. Originally it was only to maintain menu, but other features have been added:
- Hierarchical menu maintenance
- CSS style inclusion enforcement
- Page title management (linked with menu management)
- Insertable text with variable-parsing capability
- Uploading the whole site to an FTP server, while detecting files already present up-to-date at the site
- Listing all internal dependencies
- Checking non-existent internal dependencies
This web (the static portion of it) has been created and is maintained using WebComposer.
The main window shows the menu tree on the left and individual items on the right. The items have basic properties: menu caption, filename, menu image and whether WebComposer is allowed to touch the item (Managed checkbox). You can also switch to HTML document view, displaying the HTML document, or the Source view, displaying (and editting) HTML source.
The site settings allows to set a multitude of options for the site. The foremost option is the formatting for the menu - what HTML code will be inserted for each element. By default, new projects use HTML tables (such as in this website); although other styles, such as bulleted lists, can be obtained pretty easily. Note that there are some special characters used in the definitions: a pound sign (#) defines an ASCII character (#13#10 is a linebreak) and a percent sign (%) encapsulates a variable name, which gets replaced when updating the page content. The following variables are recognized:
%% - a single percent sign (%)
%active% - either "a" or "n", based on whether the item is the active menu item or not
%caption% - item's Caption, as defined in Item properties in the Main window
%class% - item's class (see note below)
%curdatetime% - current date and time, in system formatting
%filename% - item's Filename, as defined in Item properties in the main window
%level% - item's level (menu-depth), with root item being level 0
%level1% - item's level (menu-depth), with root item being level 1
%imgrelpath% - item image's path relative to current item
%relpath% - item's path relative to current item
%rootrel% - path to site's root folder, relative to current item
Note about classes: Class is a generated string that identifies the menu level and whether the item is active or not. It is the concatenation of "menu", item's level (zero-based) and if the item is active, an "a". The resulting string is therefore "menu1", "menu2a" etc. This is an ideal way to integrate CSS with menu management.
Inserts are another way to automate page building, by providing a way to insert common sections into the file. When processing each managed page, WebComposer looks for HTML comments that match the string <!--InsertName--> and <!--/InsertName--> (note the syntax, the first occurence is the insert's name, the second has an additional slash) and replaces everything in between those two comment tags with the insert InsertName. So in order to have a consistent footer in each site, only make sure every page contains a <!--MyFooter--> <!--/MyFooter--> pair and define the footer contents in the Inserts page of the Settings dialog. Also note that inserts support the same set of variables as menus, so at the very least you need to be careful with the percent sign (%).
WebComposer can upload the whole site to a server using FTP. You just need to set the FTP server name, port (usually 21), root path, FTP username and password. Then use the menu Site -> Upload in the main window. WebComposer automatically detects local dependencies in the webpages, such as pictures and links to files, and uploads those files as well. If the FTP server supports it, WebComposer only uploads files that have been modified since the last upload, therefore saving uploading time and bandwidth.
| Version 126.96.36.199
Fixed: HTML parser didn't recognize adjacent tags (caused some dependencies to be missed by the search algorithm).
Fixed: HTML source editor didn't accept the Tab key, focus was shifted instead.
| Version 188.8.131.52
Fixed: HTML header is not written into non-HTML files anymore.
| Version 184.108.40.206
Added: Check dependencies' existence
Added: Upload to an FTP server
Fixed: RelativizePath() - fully implemented, item browsing now works
Changed: Project files now use UTF8
Added: Dependencies: automatically find local dependencies in a site (<a href>, <img src> etc.) and list the files
Fixed: Do not overwrite files when creating a new item
| Version 220.127.116.11
Fixed: new projects hang upon child node creation
Fixed: default project settings' SWCHeader tag was wrong, missing a slash
| Version 18.104.22.168
|| Initial web release