The Skin Config allows designers to control many aspects of the of mojoPortal from within their skin. The general purpose is to provide designers with as much control over the look and feel of the site as possible.
Note This feature was introduced in mojoPortal 2.9, prior versions relied mostly on web.config and theme.skin settings for this functionality.
Key Points
- The config file is saved as JSON to <skin folder>/config/config.json.
- Each skin has its own config.json file. There is no way to share files.
- This file is not currently required but that is likely to change in the future.
- Any properties listed with WebConfigSettings. as their default get their default value from the web.config. You cannot use this value in your json; to use a default, simply do not include the property in your json.
Configurable Properties
Property |
Type |
Description |
Status |
Default |
Version |
Name |
string |
The name of your skin. |
future |
WebConfigSettings.DefaultInitialSkin |
2.9+ |
Version |
string |
Version of your skin. |
future |
0 |
2.9+ |
Author |
string |
Your name or the name of your company. |
future |
|
2.9+ |
License |
string |
License for your skin. |
future |
EPL |
2.9+ |
supportUrl |
string |
Full URL to your website |
future |
https://www.mojoportal.com |
2.9+ |
HelpLinkScriptPath |
string |
Relative URL to location of HelpLinkScript |
current |
~/ClientScript/mojoHelpLinkScript.js |
2.9+ |
ModalTemplatePath |
string |
Relative URL to the Modal Template html file |
current |
~/Content/Templates/mojoModal.html |
2.9+ |
ModalScriptPath |
string |
Relative URL to the Modal Script js file |
current |
~/ClientScript/mojoModalScript.js |
2.9+ |
CompatibleWith |
string[] |
Array of compatible mojoPortal versions. If empty, compatibility is assumed. Version numbers with a + include that version and all later versions. Version numbers with a - include all versions prior to that version. |
future |
n/a |
2.9+ |
RuntimeNotes |
string |
Any notes you wish to include. |
future |
|
2.9.1+ |
Display |
Display object |
Options related to display of certain controls throughout the site. |
current |
|
2.9.1+ |
MenuOptions |
MenuOptions object |
Options related to display of site menus |
current |
|
2.9.1+ |
PageMenuOptions |
MenuOptions object |
Options related to display of page menus |
current |
|
2.9.1+ |
Templates |
SkinContentTemplate[] |
Array of Content Templates to show in editors. |
current |
[] |
2.9+ |
Styles |
SkinStyle[] |
Array of Styles to show in editors. |
current |
[] |
2.9 only |
EditorStyles |
EditorStyle[] |
Array of styles to show in editors. |
current |
[] |
2.9.1+ |
EditorConfig |
Dictionary<string, EditorConfig> |
Dictionary of EditorConfig objects. |
current |
[] |
2.9.1+ |
PanelOptions |
PanelOption[] |
Array of Panel Options. |
current |
[] |
2.9 only |
Panels |
PanelOption[] |
Array of Panel Options. |
current |
[] |
2.9.1+ |
DisplaySettings |
ConcurrentDictionary<string, dynamic> |
Dictionary of dynamic objects |
current |
[] |
2.9.1+ |
Display
Property |
Type |
Description |
Status |
Default |
Version |
ShowSkinSearchInputOnSearchResults |
bool |
Toggles the display of any search input found in the layout.master on the Search Results page. |
current |
WebConfigSettings.ShowSkinSearchInputOnSearchResults |
2.9.1+ |
ShowSearchInputOnSiteSettings |
bool |
Toggles the display of any search input found in the layout.master on the Site Settings page. |
current |
WebConfigSettings.ShowSearchInputOnSiteSettings |
2.9.1+ |
ShowModuleTitlesByDefault |
bool |
Sets if Module Titles should be displayed by default. |
current |
WebConfigSettings.ShowModuleTitlesByDefault |
2.9.1+ |
EnableEditingModuleTitleElement |
bool |
Toggles ability to edit Module Title element in Module Settings. |
current |
WebConfigSettings.EnableEditingModuleTitleElement |
2.9.1+ |
ModuleTitleTag |
string |
Sets the Module Title element (tag). |
current |
WebConfigSettings.ModuleTitleTag |
2.9.1+ |
MenuOptions
Property |
Type |
Description |
Status |
Default |
Version |
UseDescriptions |
bool |
Allow descriptions in menu |
current |
false |
2.9.1+ |
UseImages |
bool |
Allow images in menu |
current |
false |
2.9.1+ |
UnclickableLinks |
bool |
All unclickable menu items |
current |
true |
2.9.1+ |
HideOn404 |
bool |
Hide menu on 404 page |
current |
WebConfigSettings.SuppressMenuOnBuiltIn404Page |
2.9.1+ |
HideOnSiteClosed |
bool |
Hide menu on Closed page |
current |
WebConfigSettings.HideAllMenusOnSiteClosedPage |
2.9.1+ |
HideOnLogin |
bool |
Hide menu on Login page |
current |
WebConfigSettings.HideMenusOnLoginPage |
2.9.1+ |
HideOnSiteMap |
bool |
Hide menu on SiteMap |
current |
WebConfigSettings.HideMenusOnSiteMap |
2.9.1+ |
HideOnRegister |
bool |
Hide menu on Register page |
current |
WebConfigSettings.HideMenusOnRegisterPage |
2.9.1+ |
HideOnPasswordRecovery |
bool |
Hide menu on Password Recovery page |
current |
WebConfigSettings.HideMenusOnPasswordRecoveryPage |
2.9.1+ |
HideOnChangePassword |
bool |
Hide menu on Changed Password page |
current |
WebConfigSettings.HideMenusOnChangePasswordPage |
2.9.1+ |
HideOnProfile |
bool |
Hide menu on Profile page |
current |
WebConfigSettings.HideAllMenusOnProfilePage |
2.9.1+ |
HideOnMemberList |
bool |
Hide menu on Member List |
current |
WebConfigSettings.HidePageMenuOnMemberListPage
|
2.9.1+ |
SkinContentTemplate
Property |
Type |
Description |
Status |
Default |
Version |
SysName |
string |
A name without spaces or special characters |
current |
|
2.9+ |
Name |
string |
The name of the template. |
current |
|
2.9+ |
Content |
string |
The HTML for the template |
current |
|
2.9+ |
EditorStyle
Property |
Type |
Description |
Status |
Default |
Version |
name |
string |
Descriptive name of style |
current |
|
2.9.1+ |
element |
string[] |
Array of elements to which the style applies |
current |
|
2.9.1+ |
type |
string |
|
current |
|
2.9.1+ |
widget |
string |
|
current |
|
2.9.1+ |
group |
string[] |
|
current |
|
2.9.1+ |
attributes |
Dictionary<string, string> |
|
current |
|
2.9.1+ |
EditorConfig
To include editor configuration, you must set the value of this property to an array of named EditorConfig objects. Documentation on individual editor configuration files can be found with each editor.
Property |
Type |
Description |
Status |
Default |
Version |
ConfigPath |
string |
Relative path to configuration js file |
current |
|
2.9.1+ |
CssPath |
string |
Relative path to CSS file to include in editor |
current |
|
2.9.1+ |
UseSkinCss |
bool |
Determines whether to use Skin CSS in editor |
current |
true |
2.9.1+ |
ContainerCssClass |
string |
CSS class for editor container element |
current |
"wysiwygeditor modulecontent" |
2.9.1+ |
Theme |
string |
Editor theme name |
current |
|
2.9.1+ |
Example
"EditorConfig": {
"all": {
"CssPath": "$SkinPath$/css/editor.css",
"UseSkinCss": true,
"ContainerCssClass": "wysiwygeditor modulecontent bloop"
},
"CkEditor": {
"ConfigPath": "$SkinPath$/config/ckeditor.js",
"CssPath": "$SkinPath$/css/ckeditor.css",
"UseSkinCss": true,
"Theme": "moono-lisa"
},
"TinyMCE": {
"ConfigPath": "$SkinPath$/config/tinymce.json",
"CssPath": "$SkinPath$/css/tinymce.css",
"UseSkinCss": true
}
},
PanelOption
This property replaced the LayoutOptions control, which was used in theme.skin to set CSS classes and display options for layout panels used in the layout. Master.
Property |
Type |
Description |
Status |
Version |
Name |
string |
Name of the property |
current |
2.9+ |
Class |
string |
CSS Class |
current |
2.9+ |
Bool |
bool |
Boolean value |
current |
2.9+ |
Example
"Panels": [
{
"Name": "RightOnlyCss",
"Class": ""
},
{
"Name": "CenterNoLeftSideCss",
"Class": "col-md-9 center-right foo"
},
{
"Name": "CenterNoRightSideCss",
"Class": "col-md-9 center-left"
},
{
"Name": "CenterNoLeftOrRightSideCss",
"Class": "col-md-12 nomargins"
},
{
"Name": "CenterWithLeftAndRightSideCss",
"Class": "col-md-6 center-left-right"
},
{
"Name": "EmptyCenterCss",
"Class": ""
},
{
"Name": "HideEmptyCenterIfOnlySidesHaveContent",
"Bool": false
},
{
"Name": "ShowLeftColumnOnSearchResults",
"Bool": false
},
{
"Name": "ShowRightColumnOnSearchResults",
"Bool": false
}
]
DisplaySettings
mojoPortal has long supported customizing control display using "DisplaySettings" controls in the theme.skin file. This worked fine for all included controls but any controls added by plugins could not be added to the theme.skin until the plugins are installed otherwise errors would be thrown, preventing use of the site entirely.
With mojoPortal 2.9.1, all DisplaySettings controls now inherit from BaseDisplaySettings class, which looks for its settings in the skin config folder. This is a major improvement because skin designers can include plugin related display settings with their skins without worrying whether or not the sites using their skins have the plugins. Likewise, plugin developers can include their related display settings in their plugin releases without worrying about overwriting those settings made by skin designers.
The properties of individual DisplaySettings controls varies greatly so we haven't listed them in this document. You can easily find these on GitHub by searching for BaseDisplaySettings and BasePluginDisplaySettings.