Server Side Module

Best Practices


The server side module is, as its label suggests, a module based on a server-side-include (SSI) file. Because SSI files are published independently, a server side module (also known as an SSI module) can be very helpful if you have different editorial schedules for a page and its embedded content. (Information on working with SSIs in available in the intranet-based WCMS Developer’s Guide. On the CDC intranet, search for “WCMS Guide.”)

Consider the following scenario:  You maintain a web page that cannot be published every day because sometimes editors have entered changes that are not ready for publishing.  However, on the same page, the content owner wants to create a “Today’s News” module that would require daily editing and publishing.  You could create the “Today’s News” element as a server side module and set its source SSI to publish daily. Publishing of the parent page could continue on an as-needed basis.

Server-side modules can also be helpful in keeping reusable content up-to-date in the live environment. When a server-side module is updated and republished, there is no need to republish its parent pages — i.e., the pages where the module is embedded.  (This can be a disadvantage if the module and its parent pages have different content owners, and one or more of the other owners prefer to review content updates before publishing.)

Creating the Source SSI

To create the SSI for a server side module, use the “New Content” option in the WCMS content browser to create a new element.  When prompted, select “Server Side Include” as the content type.  (You can create the SSI in any folder.  You do not have to store it in a wcms-inc folder.) Then, in the SSI form, build your content in the WYSIWYG editor.  Save the file with an “html” extension.

Creating the Server Side Module

Once the source SSI is in place, create or open the page (or module) where you want to insert the server side module.  Then use the “Add Element” option to insert the module.  (Both Visual Composer and the WYSIWYG editor support server side modules.)  In the module’s Settings pop-up, select the SSI you created.

If you would like the module to auto-publish on a schedule, remember to set up the publish job for the SSI file.