Code Monkey home page Code Monkey logo

custom_layouts's Introduction

Custom layouts for Layout Builder

Adds custom layouts to Layout Builder, which contain options to add css classes and titles to each section.

  • Several custom layouts are provided here, which can be further adjusted in the theme.
  • Css classes are managed via a vocabulary. There is one vocabulary for general css and another for css to use on titles.
  • We use Chosen to make the class selection super easy. That adds tags-style functionality to the simple selector.
  • The code massages the Layout Builder block list to change some category names and block titles so they make more sense in Layout Builder.

Configuration

  • Navigate to admin > extend and enable the module.
  • The code assumes that vocabularies called classes and title_classes already exist.
  • The code assumes a field called field_class is used on these vocabularies to store the actual classes.
  • The actual class(es) are stored in a field on the term, which means any descriptive title can be used for the name of the class or class collection.

Composer

To include this module in a composer project, add the following to the 'repositories' section of the top level composer.json file:

        "lullabot/custom_layouts": {
            "type": "vcs",
            "url": "https://github.com/lullabot/custom_layouts.git",
            "no-api": true
        }

Then type the following on the command line:

composer require lullabot/custom_layouts

custom_layouts's People

Contributors

karens avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.