LISTSERV at Work L-Soft
Issue 2, 2012

   Tech Tip: LISTSERV


Q: How can I change the default landing page for the LISTSERV web interface?

In a default installation of LISTSERV, visiting the web interface will automatically redirect the user to the main LISTSERV archives page. Like most of the settings for the LISTSERV web interface, the default landing page can be configured. This Tech Tip will discuss how to set that landing page on a per-user and per-role basis.

Setting User Preferences

Individual users may set their default landing pages under the Preferences screen. Once logged in, click the Preferences link in the upper right corner.

On the Start Page line, select the desired start page from the pull-down menu.

The available items in the menu will be automatically populated based on the privileges assigned to the user. The next time the user logs in, she will be automatically taken to the Server Dashboard, List Dashboard, List Moderation, Subscriber's Corner or the LISTSERV Archives page.

Setting Role Preferences

The ability for users to set a default landing page is useful, but what if the site administrator wants to make the List Dashboard the default landing page for all list owners? In LISTSERV 16.0-2011a or later, we can accomplish this by modifying the sitewide DEFAULTS web template. Under the Server Administration menu, navigate to Customization > Web Templates. In the Template Name box, type DEFAULTS, and click Search. From the Select Templates pull-down, select Default Preferences [DEFAULTS] and click Edit Template.

The DEFAULTS template allows the site administrator to set many default values for the web interface, including things like the login cookie expiration, the page caching, the default sorting of message archives, etc. The template includes comments that explain what each setting does. To set the default landing page for logins, find the following section of the DEFAULTS template:

+* Start Page
+* Value is section URL, for example:
+* ADMINDASH - Server Dashboard
+* OWNER - List Dashboard
+* MOD - List Moderation
+* REPORT&z=3&s=0&9=O - Subscriber'S Corner
+* INDEX - LISTSERV Archives
+BB &+LOGGED_IN;
config_default['GLOBAL_START'] = "INDEX"
+EB

The default start page for logged in users is set to INDEX, which is the list archives page. We can change the template as follows, to make the default start page dependent on the user's role:

+* Start Page
+* Value is section URL, for example:
+* ADMINDASH - Server Dashboard
+* OWNER - List Dashboard
+* MOD - List Moderation
+* REPORT&z=3&s=0&9=O - Subscriber'S Corner
+* INDEX - LISTSERV Archives
+BB &+LOGGED_IN; 
+* config_default['GLOBAL_START'] = "INDEX"
+BB &+IS_ADMIN; 
+* admins
config_default['GLOBAL_START'] = "ADMINDASH" 
+ELSE 
+BB &+IS_OWNER; 
+* owners
config_default['GLOBAL_START'] = "OWNER" 
+ELSE 
+* not an admin or owner 
config_default['GLOBAL_START'] = "REPORT&z=3&s=0&9=O" 
+EB 
+EB 
+EB 

The code above evaluates whether the user is logged in as a site administrator, list owner or neither, and sets the landing page appropriately for the user's role. The default config_default['GLOBAL_START'] line has been commented out and no longer applies.

User and Role Precedence

If we set a role-based start page with the template code above, individual users can still set their own user preferences. User-level preferences take precedence over the role-based preferences detailed above, so if a user is a list owner and already has her preferred start page set to the Subscriber's Corner, changing the template code above won't affect that user's existing preferences.

If the user wants to revert all of her preferences to the current system defaults, she can visit http://listserv.example.org/scripts/wa.exe?DEBUG-CLEAR-CONF to clear all stored preferences.

References

LISTSERV 16.0 Customization Manual


Subscribe to LISTSERV at Work.


© L-Soft 2012. All Rights Reserved.





Powered by LISTSERV Maestro

Subscribe to This Newsletter