Foundation Module

Overview

The Foundation module is the hart and soul of the framework. To make any component work, first the Loader view component needs to be added to your K2 Form. This component will connect to SMB4K2 web service which will enable you to add/edit CSS and JavaScript in an orderly fashion where css and javaScript will be saved in a central repository on the web service.

The Foundation module consist of the following View Components:

  • Editor
  • Loader
  • Themes
  • HelloWorld

SBM4K2.Foundation.ViewComponents.Loader

Responsibility

Loader view component of the foundation module is responsible for loading the framework for all other modules to work. This module also enable user to use the DebugMode and DevMode query parameters. These parameters doesn’t have to be configured in the main form. The view component is intelligent and will inherit the form query string.

Input

This component is parameter driven:

ParameterDescriptionExample
sbmDevModeTo enable the Development Modefalse
sbmDebugTo enable the Debug Modefalse

SBM4K2.Foundation.ViewComponents.Themes

Responsibility

This component is responsible for adding custom themes to your K2 form.

Input

This component is parameter driven:

Parameter NameDescriptionExample
sbmThemeAdd the Theme Name TextThemeName
useDefaultThemeset boolean to load new Themetrue

Outcome

Theme CSS will be added to the K2 Form by the configured view component.

Configuring Themes

Themes consist of one or a collection of items or styles. These themes can be added or altered in the Themes and the Themes.Files K2 Forms Located in the following location:

In the Themes Form you can create new themes and add CSS files to the the existing themes. In order to make the CSS files available you need add/Edit your CSS in the Themes.Files form. There is a one to many relationship between the Themes and the Themes.Files SmartBox SmartObjects.

Themes Form
Themes.Files Form with Editor

HelloWorld

The HellowWorld component is an example view component to demonstrate how custom Modules can be created.

Published by

Igor Jericevich

Off the charts lunatic with technology

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.