User Controls and MVC Action controls are small but powerful. Like vital DNA switches, they unlock the coding of core Higher Logic Product functions in websites and support modification through parameters. More information about User Controls and Parameters can be accessed by Global Admins on the HUG Webcontrols Page. The use of User Control and MVC Action Content Items is documented throughout this site on a product-by-product basis.
Aspects of User Controls and MVC Action content
The top illustrationbelow shows an Enter/Edit Content Page for which User Control has been selected as the Content Type. The bottom illustration shows the list of Content Items as seen on a Navigation Page. The numbered items illustrate characteristics of all user controls.
1 User Controls can only be used in User Control Content Items
2 Only one User Control can be used per Content Item
3 User Controls are modified through Parameters, which can be selected through the Parameter List.
4 The Parameters in use are displayed in the User Control Parameters field. Multiple Parameters can be simultaneously applied to a User Control
5 Web pages can contain multiple Content Items, including multiple Content Items based on User Controls.
A Parameter provides an input changing a specific aspect a User Control's functionality. User Control coding includes many default values for the various aspects of functionality. For the ws:Announcements User Control, the defaults include how many posts to show (five) and how much text to show (50 characters). Correctly formed Parameters override defaults such as these.
Parameter Structure and Format
Parameters consist of two parts with an equals sign in the middle. At left is the "base". At right is the "value". The base refers to the default to be changed. Parameter bases are case sensitive and will not work and cause errors if not capitalized correctly. The value provides the change to the default. Different Parameters accept different kinds of values. The format accepted is displayed on the Describe Control page of the CCAdmin site, and put into "plain English" on Enter/Edit Content Page Parameters lists.
The most common Value Formats are listed in the table below.
|Parameter Value Format||Input Needed||Common Example with Correct Formatting|
|Boolean||true or false||ShowPicture="true"|
|String||a series of letters and/or numbers||MoreLinkText="Click to see all posts"|
|GUID (global unique identifier)||a key||CommunityKey="2007f287-a30c-4488-a083-6fc121c8114e"|
Three primary resources exist to assist HLAdmins understand which Parameters are accepted by a User Control.
1) Enter/Edit Content Pages
As shown above, lists of important Parameters are now included on Add/Edit Content pages. These clickable lists include information on the kind of inputs accepted. To add Parameters from these lists, simply double-click on them. The Parameter selected will appear in the User Control Parameters field. The Admin must then add an acceptable value between the quote marks, and remove any spaces from the beginning and end of the value.
2) The Web User Controls Page of HUG
For Landing Page Content Items, such as those that display recent Discussion posts and new Blogs, it is recommended that HLAdmins utilize the Webcontrols page of HUG. Tools on the page help create Parameter lists for the Content Items routinely used on home pages. See below for more information on Landing Page Content Items.
3) The View Control Params Page of CCAdmin
A comprehensive list of all Parameters accepted for any User Control can be created using the View Control Params page (also called the Describe Control page) of the CCAdmin site. These lists specify the kind of value input needed for each Parameter. While these lists do not provide insight on the precise impact of each Parameter, the purpose is generally gleaned from the name of the Parameter. The View Control Params page is accessed under the Utilities area of the CCAdmin left-side navigation.
The three sources listed above do not need to be used to add Parameters. It is possible and recommended that Admins copy entire Parameter lists across Content Items utilizing the same User Control. Keying (typing) Parameter bases is not recommended as they are case sensitive and a single typo can cause a page-wide error. When possible, copy/paste Parameters from the documentation website, HUG, Release Notes, and other Higher Logic resources.