DriveWorks Pro 15: Create a Custom Module [send feedback...]

Create a Custom Module

The quickest and easiest method to create a custom module is to base it on an existing module supplied by DriveWorks. Browse through the existing modules (as detailed above) to find a module that is suitable for modification.

Custom Skins and Modules

When presenting Skins or Modules in the application DriveWorks will present all items in the folder

%ProgramData%\DriveWorks\[version]\Live\Themes\Web\content\custom folder

and then from the folder

%ProgramData%\DriveWorks\[version]\Live\Themes\Web\content\system folder

Items in the \system folder are maintained by DriveWorks (for future releases) and should NOT be modified.

Items in the \custom folder will not be overwritten by future releases of DriveWorks, therefore any customization will be available when future releases are installed.

You can create your own Modules which will then be available from Edit mode on each web page by following the steps below:

  1. Locate the folder that contains the module to base your custom module on.

    Modules folder Location

    The location of the default Modules that are installed when DriveWorks is installed is:

    Windows 7, Windows 8, Windows 10
    Folder NameModules
    Location %PROGRAMDATA%\DriveWorks\[Version Number]\Live\Themes\Web\content\system\modules
    Example C:\ProgramData\DriveWorks\[Version Number]\Live\Themes\Web\content\system\modules
    DescriptionDriveWorks Live Modules Files are stored here **DO NOT MODIFY**
  2. Copy the chosen Module folder (This will be the folder named Login, Menu, Projects, etc., etc...) to the Web\content\custom\Modules folder.

    Modules folder Location

    The location where any default Modules folder should be copied, prior to customization, is:

    Windows 7, Windows 8, Windows 10
    Folder NameModules
    Location %PROGRAMDATA%\DriveWorks\[Version Number]\Live\Themes\Web\content\custom\modules
    Example C:\ProgramData\DriveWorks\[Version Number]\Live\Themes\Web\content\custom\modules
    DescriptionModules folder is an empty folder for copying parts from the Web theme to enable modification
  3. Rename the folder that has just been copied to be the name required for your new module, for example:
    Original Module FolderCopied FolderNotes
    Live\Themes\Web\content\system\modules\ LoginLive\Themes\Web\content\custom\modules\ LoginRename the folder indicated byLogintoMy Module(for example)
  4. The new module will now be displayed once you enter Edit mode on each web page.
  5. The files included in the new folder can then be modified to customize your own module. The following headings give some guidelines for modifications that can be applied.

Create an Image for your Custom Module that is Displayed as an Icon in Edit Mode

Your own image can be used as an icon for the new module by creating an image with the following properties:

  • Dimensions: 32w x 32h
  • File Name: Toolbox.png

Follow the steps below to display your image:

  1. Place the new image in the folder created for your module; for example Live/Themes/WebConfiguration/Skins/ My Module.
  2. This folder will already contain an image of the same name, confirm your acceptance to overwrite the file in any dialog that appears.

Modify the Modules View Files

Each module, in general, will contain two .cshtml files that specifically deal with how the module will be displayed (UI).

  • \views\main.cshtml - how the module behaves when in edit mode in the browser.
  • view\views\main.cshtml - how the module behaves when it is viewed, during specification for instance.

Typically only the view\views\main.cshtml file should be modified. This will require knowledge of HTML and CSS. For more advanced server side communication, knowledge of VB.Net is required.

So for the Login Module for example, the View.ascx file will be found in the location (once copied to the custom folder):

C:\ProgramData\DriveWorks\[Version Number]\Live\Themes\Web\content\custom\modules\Login\view\views

Table of Contents