Skip to content
This repository has been archived by the owner on Sep 16, 2020. It is now read-only.

tobyjug/perch-superlist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Perch CMS Superlist Field Type

What is it?

Adds a field type to Perch CMS that makes it easy to edit and output unordered/ordered lists.

Features

  • Output uls or ols
  • Drag and drop to reorder
  • Press Enter to move to next item
  • One click delete
  • Add classes to rendered html

Superlist

Installation

Copy superlist folder into /perch/addons/fieldtypes/

Usage

Once installed, the field type can be used in a template by specifying the type attribute as superlist:

<perch:content id="mylist" type="superlist" label="My List">

Ordered Lists

By default the field type will render a ul but you can override this to be an ol by adding ol="true"

<perch:content id="mylist" type="superlist" label="My List" ol="true">

Adding Classes

You can add one or more classes to your list:

<perch:content id="mylist" type="superlist" label="My List" class="my-list-class">

This will output

<ul class="my-list-class">
...
</ul>

Roadmap

  • Switch from jQuery to Vue for core functionality
  • Switch to vue for drag and drop
  • Navigate list using ⬆️ and ⬇️ arrows
  • Nested lists