Theme API

Laravel application helpers are simple Ruby functions which accepts a 1 or more value, an optional argument, process those values and return a value to be displayed on the page.
Name Description
Public Methods in the View
getName() Get product name.
{{ getName() }}
addHtmlAttribute(scope, name, value) Add HTML attributes by scope.
{{ addHtmlAttribute(scope, name, value) }}
addHtmlAttributes(scope, attributes) Add multiple HTML attributes by scope.
{{ addHtmlAttributes(scope, attributes) }}
addHtmlClass(scope, value) Add HTML class by scope.
{{ addHtmlClass(scope, value) }}
printHtmlAttributes(scope) Print HTML attributes for the HTML template.
{{ printHtmlAttributes(scope) }}
printHtmlClasses(scope, full = true) Print HTML classes for the HTML template.
{{ printHtmlClasses(scope, full = true) }}
getIcon($name, $class = '', $type = '') Get Keenicons icon code.
{{ getIcon('calendar', 'fs-1 text-primary', 'duotone') }}
asset(path) Get an assets path in assets folder by path.
{{ asset(path) }}
setModeSwitch(flag) Set dark mode enabled status.
{{ setModeSwitch(flag) }}
isModeSwitchEnabled() Check dark mode status.
{{ isModeSwitchEnabled() }}
setModeDefault(mode) Set the mode to dark or light.
{{ setModeDefault(mode) }}
getModeDefault() Get current mode.
{{ getModeDefault() }}
setDirection(direction) Set style direction.
{{ setDirection(direction) }}
getDirection() Get style direction.
{{ getDirection() }}
isRtlDirection() Check if style direction is RTL.
{{ isRtlDirection() }}
extendCssFilename(path) Extend CSS file name with RTL or dark mode.
{{ extendCssFilename(path) }}
includeFavicon() Include favicon from settings.
{{ includeFavicon() }}
includeFonts() Include the fonts from settings.
{{ includeFonts() }}
getGlobalAssets(type) Get the global assets.
{{ getGlobalAssets(type) }}
addVendors(vendors) Add multiple vendors to the page by name. Refer to settings KT_THEME_VENDORS.
{{ addVendors(vendors) }}
addVendor(vendor) Add single vendor to the page by name. Refer to settings KT_THEME_VENDORS.
{{ addVendor(vendor) }}
addJavascriptFile(file) Add custom javascript file to the page.
{{ addJavascriptFile(file) }}
addCssFile(file) Add custom CSS file to the page.
{{ addCssFile(file) }}
getVendors(type) Get vendor files from settings. Refer to settings KT_THEME_VENDORS.
{{ getVendors(type) }}
getCustomJs Get custom js files from the settings.
{{ getCustomJs }}
getCustomCss Get custom css files from the settings.
{{ getCustomCss }}
getHtmlAttribute(scope, attribute) Get HTML attribute based on the scope.
{{ getHtmlAttribute(scope, attribute) }}
Public Methods in the Controllers
getName() Get product name.
helpers.getName()
addHtmlAttribute(scope, name, value) Add HTML attributes by scope.
helpers.addHtmlAttribute(scope, name, value)
addHtmlAttributes(scope, attributes) Add multiple HTML attributes by scope.
helpers.addHtmlAttributes(scope, attributes)
addHtmlClass(scope, value) Add HTML class by scope.
helpers.addHtmlClass(scope, value)
printHtmlAttributes(scope) Print HTML attributes for the HTML template.
helpers.printHtmlAttributes(scope)
printHtmlClasses(scope, full = true) Print HTML classes for the HTML template.
helpers.printHtmlClasses(scope, full = true)
getIcon($name, $class = '', $type = '') Get SVG icon content.
helpers.getIcon('calendar', 'fs-1 text-primary', 'duotone')
asset(path) Get an assets path in assets folder by path.
helpers.asset(path)
setModeSwitch(flag) Set dark mode enabled status.
helpers.setModeSwitch(flag)
isModeSwitchEnabled() Check dark mode status.
helpers.isModeSwitchEnabled()
setModeDefault(mode) Set the mode to dark or light.
helpers.setModeDefault(mode)
getModeDefault() Get current mode.
helpers.getModeDefault()
setDirection(direction) Set style direction.
helpers.setDirection(direction)
getDirection() Get style direction.
helpers.getDirection()
isRtlDirection() Check if style direction is RTL.
helpers.isRtlDirection()
extendCssFilename(path) Extend CSS file name with RTL or dark mode.
helpers.extendCssFilename(path)
includeFavicon() Include favicon from settings.
helpers.includeFavicon()
includeFonts() Include the fonts from settings.
helpers.includeFonts()
getGlobalAssets(type) Get the global assets.
helpers.getGlobalAssets(type)
addVendors(vendors) Add multiple vendors to the page by name. Refer to settings KT_THEME_VENDORS.
helpers.addVendors(vendors)
addVendor(vendor) Add single vendor to the page by name. Refer to settings KT_THEME_VENDORS.
helpers.addVendor(vendor)
addJavascriptFile(file) Add custom javascript file to the page.
helpers.addJavascriptFile(file)
addCssFile(file) Add custom CSS file to the page.
helpers.addCssFile(file)
getVendors(type) Get vendor files from settings. Refer to settings KT_THEME_VENDORS.
helpers.getVendors(type)
getCustomJs Get custom js files from the settings.
helpers.getCustomJs
getCustomCss Get custom css files from the settings.
helpers.getCustomCss
getHtmlAttribute(scope, attribute) Get HTML attribute based on the scope.
helpers.getHtmlAttribute(scope, attribute)
Preview Get Help Buy Now