59.2. The index.cgi Program

Because most of the graphical customization done by this theme occurs in the theme.pl script, its replacement index.cgi program does not differ much from the standard index.cgi in the top-level Webmin directory. The biggest difference is that it does not output any special index page heading or image. Instead, it just gets the list of modules available to the current user with get_available_module_infos and uses it to build a table of icons in the current category. Because the theme's theme_header function also calls this function, the list may already be in the global @msc_modules variable. Theme CGI programs execute in the “original” directory instead of the directory they are really in, therefore the index.cgi

Get Managing Linux® Systems with Webmin™ System Administration and Module Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.