Vendor Style Menus in Wacs 0.8.x and later

Backgound Info

One of the big new features in Wacs 0.8.0 was the introduction of the configurable menu system. With this we did an extensive review of how our existing menus were constructed and decided to remove the old separation between those images housed in a dedicated area for each upstream source and those housed in more general areas. This supplier-identified versus content type based architecture may have suited our original development environment but we don't think it really reflects how most people would visualise and use folders in a normal WACS installation.

So the new default layout in 0.8.0 gets rid of the vendor area distinction completely. However if existing Wacs users who adopted the old vendor based architecture want to preserve it, or others have some special reason for wanting it organised that way, there are still facilities to keep it the way it was. This document takes you through the changes needed to reproduce the old layout using the 0.8.0 release.

How To Configure Vendor Mode

Step 1: Enable vendormode in the configuration file

The first thing you need to do is to enable vendormode in the configuration file. By default in Wacs 0.8.0 and later, this is set to N (for No). If no setting is specified, it will default to No. To change this you need to edit the global Wacs configuration file which is usually to be found in /etc/wacs.d and called wacs.cfg. You should be able to edit this using whatever your preferred text editor is.

Look through the file and see if there is a section called layout as this is where the vendormode attribute needs to be. If there is already a vendormode entry, make sure it is set to Y (the upper case letter 'y', not Yes). It should now read:

 <vendormode>Y</vendormode>

If there is not already a section called layout, you will need to add one (this is the most likely case). You do not need to worry about creating a new section as any variable will always be defaulted if it isn't explicitly mentioned. The complete new section entry should now read:

 <layout>
  <vendormode>Y</vendormode>
 </layout>

Step 2: Adding The Menu Entries

The next step is to add custom menus for the second and third pull down menus on the Wacs Front Page (wacsfp) which is the same location for these menus as it was in the earlier releases. These are known as fpmenu2 and fpmenu3 respectively. Due to the way this feature works it's STRONGLY recommended that you use these two menus as is. However the actual requirement is that the general (ie non-vendor) menu entries be on either menu fpmenu1 or fpmenu2, and that the vendor based ones be on menu fpmenu3 and higher (to fpmenu7). The values of the variables isarea and vsarea change at fpmenu3 when vendormode is enabled.

The menus are controlled by the menu.cfg file which is to be found in the same location as the wacs.cfg, usually /etc/wacs.d. Any menu entry defined in here will be the complete definition of that menu; any menu not defined will take the default definition. If the menu.cfg file already exists you need to leave out the top (XML identification) line and the second and final lines that define this as a menu definition file (the <menu> and </menu> entries). You obviously also need to check that menus fpmenu2 and fpmenu3 are not already defined within this file. The resulting menu.cfg should contain the following:

<?xml version='1.0' standalone='yes'?>
<menu>
 <fpmenu2>
  <menutitle>Sections: General</menutitle>
  <default>#CGIURL#wacsimgcats</default>
  <entry>
   <type>foreach</type>
   <variable>isarea</variable>
   <title>#OPTDESC# - images</title>
   <target>#CGIURL#wacsshow/sarea=#OPTIONS#</target>
  </entry>
  <entry>
   <type>foreach</type>
   <variable>vsarea</variable>
   <title>#OPTDESC# - videos</title>
   <target>#CGIURL#wacsvidshow/sarea=#OPTIONS#</target>
  </entry>
 </fpmenu2>
 <fpmenu3>
  <menutitle>Sections: Vendors</menutitle>
  <default>#CGIURL#wacsvidcats</default>
  <entry>
   <type>foreach</type>
   <variable>isarea</variable>
   <title>#OPTDESC# - images</title>
   <target>#CGIURL#wacsshow/sarea=#OPTIONS#</target>
  </entry>
  <entry>
   <type>foreach</type>
   <variable>vsarea</variable>
   <title>#OPTDESC# - videos</title>
   <target>#CGIURL#wacsvidshow/sarea=#OPTIONS#</target>
  </entry>
 </fpmenu3>
</menu>

Once this file is in place, log in to Wacs and try out the menus - the separate collections-versus-category menus should work as before. Please do be aware however that the backwards compatibility features may not remain in the Wacs system permanently.