Skip to content

Widget

Widgets are one the basic building blocks of any project. They provide the user interface to Desktop, Mobile, Tablet. Widget has full control over the area of the screen.

Directories and files

Every widget project root should include the following directories and files:

  • _SiteText/* - Your project siteText files.
  • Controller/* - Controller classes.
  • Images/* - All digital assets.
  • Scripts/* - All javascript assets.
  • Tools/* - Alkami specific files related to widget installation.
  • Views/* - Contains subfolders for each controller, and within each controller’s subfolder, there are views ccorresponding to the actions of the controller.

Example Project Tree

A common widget project directory looks like this:

  • Directory_SiteText/
    • WidgetComponent.sitetext.en.xml
  • DirectoryController/
    • MobileWidgetComponentController.cs
    • WidgetController.cs
  • DirectoryImages/
  • DirectoryModels/
  • DirectoryProperties/
  • DirectoryScripts/
    • widgetcomponent.js
  • DirectoryTools/
    • chocolateyInstall.ps1
    • chocolateyUninstall.ps1
    • install_widget.sql
    • PostBuild.ps1
  • DirectoryViews/
    • DirectoryWidgetComponent/
      • DirectoryMobile/
        • Error.cshtml
        • Index.cshtml
      • Index.cshtml
      • Error.cshtml