New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

grid-light-module

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grid-light-module

Light module for managing viewports configuration and integrating a Grid JS field

latest
npmnpm
Version
1.1.2
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

GRID Light Module for Magnolia CMS

The GRID Light Module for Magnolia CMS provides a way to manage viewports configuration and integrate a Grid JavaScript field.

Requirements

Ensure the following modules are installed in your Magnolia CMS bundle:

  • Pages Viewports Extension
  • JavaScript UI module

Features

  • Viewports Configuration - decoration of the pages-viewports-extension, allows for setting the custom viewports in a page template.
  • Grid JS Field Include - JS field that can be used in the dialog definition.
  • Grid JS Field Webresources - contains resources for Grid settings based on the custom viewports.
  • Config for actions in dialog

Usage

Installation

  • Download the grid-light-module package.
  • Place it into your light modules directory.

Viewports Configuration

  • Define the custom viewports in the page template definition:
$type: viewportsExtensionSiteSpa
templateViewportList:
  - id: desktop
    displayName: Desktop
  - id: tablet
    displayName: tablet
    width: 768
    height: 667
  • Or define the custom viewports in the pages-viewports-extension decoration:
templateViewportsConfigurationImpl:
  class: info.magnolia.pages.viewports.config.DefaultTemplateViewportsConfiguration
  templateViewportList:
      id: desktop
      displayName: Desktop
    - id: tablet
      displayName: tablet
      width: 768
      height: 667

Add default values for the components

  • Update the page template definition to add default values for specific viewports:
areas:
  main:
    title: Main Area
    availableComponents:
      Headline:
        id: spa-lm:components/headline
      Text:
        id: spa-lm:components/text
    defaultValues:
      Headline:
        templateId: spa-lm:components/headline
        viewportDefaultValues:
          - id: desktop
            columns: 8
          - id: tablet
            columns: 12
      Text:
        templateId: spa-lm:components/text
        viewportDefaultValues:
          - id: desktop
            hide: true

Use Grid JS field include

Example component's dialog definition:

form:
  $type: tabbedForm
  implementationClass: info.magnolia.ui.javascript.form.FormViewWithChangeListener
  tabs:
    layout: !include:/grid/includes/grid.yaml

Keywords

magnolia

FAQs

Package last updated on 29 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts