Skip to content
Snippets Groups Projects
Select Git revision
  • 1.0.0-beta9
  • 1.0.x default
  • 3385604-missing-toastifycdn-and
  • toolbar
  • 8.x-2.x
  • 1.0.0-rc4
  • 1.0.0-rc3
  • 1.0.0-rc2
  • 1.0.0-rc1
  • 1.0.0-beta16
  • 1.0.0-beta15
  • 1.0.0-beta14
  • 1.0.0-beta13
  • 1.0.0-beta12
  • 1.0.0-beta11
  • 1.0.0-beta10
  • 1.0.0-beta8
  • 1.0.0-beta7
  • 1.0.0-beta6
  • 1.0.0-beta5
  • 1.0.0-beta4
  • 1.0.0-beta3
  • 1.0.0-beta2
  • 1.0.0-beta1
24 results

gin_lb-3385604

  • Clone with SSH
  • Clone with HTTPS
  • Forked from project / gin_lb
    119 commits behind the upstream repository.

    UI Patterns Settings

    INTRODUCTION

    Make UI Patterns configurable through settings.

    Sample pattern:

    card:
      label: Card
      description: A card component.
      variants:
        product:
          label: Artwork
          settings:
            modifier: artwork
            attributes: "class=\"shadow-bottom\""
      settings:
        modifier:
          type: textfield
          label: Modifier
          description: Add modifier here
        url:
          type: token
          label: Url
          default_value: "[node:url]"
        attributes:
          type: attributes
          label: Attributes
      fields:
        image:
          type: image
          label: Image
          description: Card image.
          preview:
            type: pattern
            id: image
            fields:
              image:
                theme: image
                uri: http://lorempixel.com/400/200/nature/2
        title:
          type: text
          label: Title
          description: Card title.
          preview: Card title
        text:
          type: text
          label: Text
          description: Card text.
          preview: Cras justo odio, dapibus ac facilisis in.

    Sample card pattern template:

    
    <a href="{{ url }}" class="card card--{{ modifier }} {{ attributes.class }}" 
    {{ attributes|without('class') }}>
      <div class="thumbnail">
        {{ image }}
        <div class="caption">
          <h3>{{ title }}</h3>
          <p>{{ text }}</p>
        </div>
      </div>
    </a>

    Sample Images: Settings in manage display: pattern settings

    Each settings type is a plugin. You can easily create your own setting types. hook_preprocess is not needed any more

    Currently available setting types are:

    • textfield
    • select
    • boolean
    • checkbox (multi value)
    • attributes
    • token
    • url (Generates urls from uri or user input. Tokens are accepted. Useful for linkfield uris?)

    REQUIREMENTS

    • ui patterns >= 1.1.

    INSTALLATION

    CONFIGURATION

    Navigate to Manage Display of your entity type select an pattern and you will find your configured settings.