Module: alfresco/layout/StripedContent

alfresco/layout/StripedContent

A layout control used to provide "stripes" of content, where a full-width background contains a centred, fixed-width area of content.
Author:
  • Martin Doyle
License:
Source:

Example

Sample configuration:

{
   name: "alfresco/layout/StripedContent",
   config: {
      contentWidth: "1200px", // Optional: Overrides default of "960px"
      widgets: [
         {
            name: "alfresco/logo/Logo",
            stripeClass: "header" // Optional: Current built-in classes are: "header","sub-header","menu"
         },
         {
            name: "alfresco/html/Label",
            stripeClass: "sub-header",
            config: {
               label: "This is the sub-header",
               additionalCssClasses: "bold"
            }
         },
         {
            name: "alfresco/html/Label",
            stripeClass: "menu",
            config: {
               label: "This is the menu row"
            }
         },
         {
            name: "alfresco/html/Label",
            stripeStyle: "background: #fee; padding: 30px 0;", // Optional
            config: {
               label: "Content goes here..."
            }
         }
      ]
   }
}

Members

baseClass :string

The base class for the widget
Type:
  • string
Default Value:
  • "alfresco-layout-StripedContent"
Source:

contentWidth :string

The size of the fixed-content inside the stripe, as a CSS dimension
Type:
  • string
Default Value:
  • "960px"
Source:

cssRequirements :object[]

An array of the CSS files to use with this widget.
Type:
  • object[]
Default Value:
  • [{cssFile:"./css/StripedContent.css"}]
Source:

Methods

createWidgetDomNode(widgetConfig, rootNode, rootClassName)

Creates a new DOM node for a widget to use. The DOM node contains a child
element that the widget will be attached to and an outer
element that additional CSS classes can be applied to.
Parameters:
Name Type Description
widgetConfig object The widget definition to create the DOM node for
rootNode element The DOM node to create the new DOM node as a child of
rootClassName string A string containing one or more space separated CSS classes to set on the DOM node
Source: