#55

Product support

Visit this product's website for support.

Categories

  • Marketing
  • Miscellaneous
  • Utility

Universal plugin to store records in separated lists each with own form setup.

Useful for portfolios, simple galleries, contacts, testimonials, clients lists, logos, partners, etc.

Small Records can help with:

  • Create any number of lists to store records
    • Define what form fields will be available to each of the lists
    • Add your custom form with simple form builder (based on repeater)
    • Add categories, tags and attributes to your records
  • Render records in web with components (Records and Record detail, Categories and Category detail)
  • Permissions to access each of the plugin parts and each of the lists
  • Import/Export categories and records

Small Records works with other plugins

Rainlab Blog - you can assign records to your blog posts
More to come...

Read a Basic use case part at the end of the Documentation to start quickly working with Small Records.

The following themes use this plugin:

Records in a list

Small Records

Universal plugin for storing and presenting (almost) any kind of data

Install from OctoberCMS backend Settings > Updates&Plugins > Install plugins with name Small Records.

You can set permissions for plugin parts and created lists.

There ase som settings in Settings > Small Plugins > Small records.

About Small Records

Main idea behind this plugin is to have a place where I can easily organize records in several lists (like portfolio, partners, sliders and their images, simple photo galleries, etc.).

The simplest scenario is:

Manage records:

  • Go to backend and open Records from top menu.
  • Create some categories, tags, attributes.
  • Create lists of records.
  • Create records in those lists and assign categories, tags, attributes - if needed.

Create pages

  • Create default Layout for all pages
  • Create page Record with URL /record/:record
    • Add component Small Records >┬áRecord
  • Create page Category with URL /category/:category
    • Add component Small Records > Category
  • Create page Records with URL /records/:category?
    • Add components Small Records >┬áCategories and Small Records >┬áRecords

Visit frontend

Go to page /records. There should be categories listed and records.

All records and categories are connected with links.

Look at the end of this documentation for more detailed how to.

Small Records parts

Lists

Lists are groups of records. They can be eg. Products, Photo albums, Logos, ...

Created list will be appended to the top of the left side menu.

Create custom records form

When creating a new list you can allow predefined form fields or you can create your own form definition (based on repeater).

When creating or editing a List, open tab Custom repeater and allow its use.

Set basic settings and add new fields to your custom form.

Each list can has a different form.

Look inside a default Record detail component partial to see how to work with custom repeater data.

Categories

Here you can manage categories.

They can be organized into a tree - click on button Reorder and drag&drop category over another one.

Tags

Simple list of tags that can be assigned to records.

Attributes

If you need to store a specific information for your records, that is not in default records form, here you can define a name of an attribute and it's type (string, text, number, switch).

Create or edit a record and go to tab Attributes (but this tab must be allowed in List settings to be visible!).

Access attributes in Twig

If you assigned one or more attributes to any record, you can iterate through them with Twig code like:

{% for attribute in record.attributes %}

    {{ attribute.name }} : {{ attribute.value }}

{% endfor %}

Or there are functions to get a specific attribute (or attribute's value) by slug like:

    {{ record.getAttributeBySlug('my-attribute-slug') }}

    {{ record.getAttributeValueBySlug('my-attribute-slug') }}

Import and Export

There are buttons ready in Records and Categories lists.

Components

There are components and default partials ready to use in your Layout, Page or Partial.

Component's default partials are meant as templates - you should customize them to your needs as these can change in a future!

Best way to customize them is to copy them to yout theme folder like:

/themes/my-theme/partials/records/default.htm

Folder records should be named after component's alias name. See more details in OctoberCMS docs.

Component: Categories

Put default partial {{ component 'categories' }} in your layout/page/partial to inspect how to work with categories lists.

Customize component's parameters.

Component: Records

You can add a Records component to a page, layout or partial.

Put default partial {{ component 'records' }} in your layout/page/partial to inspect how to work with records lists.

Customize component's parameters.

Component: Record

Put default partial {{ component 'recordDetail' }} in your layout/page/partial to inspect how to work with records lists.

Customize component's parameters.

Basic use case

Install Small Records plugin.

In OctoberCMS backend click in main menu on Records and then in left pane on Lists.

Create a new list.

Add some records to this list, add some categories, tags and attributes (and assign them to some of your records if you want).

Layout file

Go to a CMS part of backend and create a layout file Default with content:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>Records</title>
        <meta name="title" content="Records">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
        {% styles %}
    </head>
    <body>

        {% page %}

    </body>
</html>

Single record page

Create a CMS page with name Record and URL /record/:record.

Select its layout Default.

From left pane add a Small Records > Record component to the page content window on right side.

Save a file.

Single category page

Create a CMS page with name Category and URL /category/:category.

Select its layout Default.

From left pane add a Small Records > Category component to the page content window on right side.

Save a file.

Records and categories page

Create a CMS page Records with URL /records/:category?.

Select its layout Default.

From left pane add components to the page content:

Save a file;

The result

Open URL `/records' to see the records list.

You should be able to filter by category a and to click on records to see a detail.


Special thanks goes to:
OctoberCMS team members and supporters for this great system. Samuel Zeller for his photo I have used in the plugin banner. Font Awesome for Universal access symbol.

Created by Jan Vince, freelance web designer from Czech Republic.

  • Found the plugin useful on 31 Jul, 2018

    Absolutely delighted with your plugin! More functional than many paid solutions. If you were to document it in more detail, there would be many more using it. I also have questions. Tell me, how to do pagination? Forgive my English. Thank you!

  • author

    Replied on 6 Aug, 2018

    Hi Andrey and thank you,

    I am working on better documentation but have not much time right now. And about paginations - please open an issue on GitHub and we can discuss it there.

  • Found the plugin useful on 31 May, 2018

    Very versatile plugin. Thumbs up!

  • author

    Replied on 31 May, 2018

    Thank you!

  • Found the plugin useful on 11 Jan, 2018

    Great plugin! Perfect when builder is overkill. I've noticed few small issues that I am sure will be worked out.

    Request: Making it easier to add items in the backend. As it stands, when adding new items you must click the "New" button then create the item and close it then click the new item button again. I would suggest a new button when adding new items called "Create and add new" which saves the new item and opens another blank new item page. This should greatly improve the ease of creating long lists with little effort.

    Thanks for making this fantastic plugin!

  • author

    Replied on 12 Jan, 2018

    Hi Ethan, thanks and this is a good idea!

    I have added new buttons Create and NEW and Update and NEW and also autofocus first form field, so you can start typing without click first field.

    And one more thing - new buttons have also new keyboard shortcut: Cmd+Alt+Enter (or Ctrl+Alt+Enter if you are on Windows/Linux).

    Best regards,
    Jan

  • Found the plugin useful on 4 Oct, 2017

    Love your plugin. Very flexible!

    One question: for my current project I'll try to use the images (not preview_image), but I'm not able to get them out with the recordDetail component. I was trying something like {% for record in SELF.items %} {% if recordDetail.images %} <img alt="{{ recordDetail.name }}" src="{{ recordDetail.images.getPath }}" style="width:300px;"/> {% endif %} {% endfor %}

    Can you give me a hint, please?

  • author

    Replied on 5 Oct, 2017

    Thank you and if you know how to use GitHub, let's start discussion there.

    I you don't use GitHub, try this simple page setup (you have to use correct list slug - I have portfolio here):

    title = "records"
    url = "/records/:slug?"
    layout = "default"
    is_hidden = 0
    
    [records]
    areaSlug = "portfolio"
    categorySlug = "{{ :category }}"
    activeOnly = 1
    detailPageSlug = "record-detail"
    orderBy = "date"
    orderByDirection = "DESC"
    ==
    
    {% for record in records.items %}
    
      {% for image in record.images %}
    
        <img src="{{ image.getThumb(300, null) }}">
        <img src="{{ image.getPath }}">
    
      {% endfor %}
    
     {% endfor %}

  • Found the plugin useful on 3 Oct, 2017

    Very good plugin. Helpful on tasks where "Builder" is overuse. But needing some fixes from developer. (I'll write my issues to github)

  • author

    Replied on 5 Oct, 2017

    Thanks and I will check GitHub for your issues!

3.2.1

Changes beforeSave to beforeUpdate method

Nov 16, 2018

3.2.0

Added relation to Backend administrator in the Record, so autor/editor od the record can be displayed

Nov 16, 2018

3.1.1

Fixed translations for Custom repeater

Nov 06, 2018

3.1.0

Added option to order records as Collection (useful for SQL(ite) database records ordering in different locale)

Oct 29, 2018

3.0.3

Changed naming - Custom repeater -> Custom form fields

Oct 29, 2018

3.0.2

Updated default Category detail component partial

Oct 03, 2018

3.0.1

Changed default values for Records component

Oct 03, 2018

3.0.0

!!! This is a breaking change update! I have unified components parameters naming and translation strings. Please review your code and change affected parameters! Look in components default partials for help and examples.

Oct 03, 2018

2.2.0

Added Record detail default component partial. Added new Record detail parameters.

Oct 03, 2018

2.1.2

Updated Categories component default partial.

Oct 01, 2018

2.1.1

Changed the logic of filtering records and categories in Categories component.

Oct 01, 2018

2.1.0

Added pagination to Records component when limit is allowed (Length aware paginator is used).

Oct 01, 2018

2.0.7

Fixed bug in Record controller.

Oct 01, 2018

2.0.6

Tags are now ordered by name in Record form.

Oct 01, 2018

2.0.5

Removed dumps from component.

Oct 01, 2018

2.0.4

Fixed Records component record detail slug. Updated docs.

Oct 01, 2018

2.0.3

Updated Record detail component. Updated documentation in README.txt file.

Oct 01, 2018

2.0.2

Fixed custom repeater fields definition. Updated Record detail component.

Oct 01, 2018

2.0.1

Added custom repeater form builder for lists and its records

Oct 01, 2018

2.0.0

!!! Updated default Records and Categories components partials and params - please test them before update in production!

Oct 01, 2018

1.12.1

Fixed optional relationship with Blog post

Aug 27, 2018

1.12.0

Added useMultiCategories property to Records component to allow filtering by categories selected in Categories tab

Jul 19, 2018

1.11.1

Fixed allowLimit default false state in components

May 10, 2018

1.11.0

Added multi-categories checkbox to Categories component. Added categories column to records list.

May 08, 2018

1.10.1

Added sorting to record's related blog posts

May 07, 2018

1.10.0

Added reverse relation 'blog_posts' to record object to allow related blog posts listing

May 07, 2018

1.9.8

Fixed custom reordering of records to show only selected Area records

Apr 23, 2018

1.9.7

Removed Prev & Next buttons in Records update form (as it never worked reliable)

Apr 23, 2018

1.9.6

Added limit to categories component

Apr 19, 2018

1.9.5

Added records columns for description and content.

Apr 19, 2018

1.9.4

Fixed Records component

Apr 19, 2018

1.9.3

Chanded input custom list column type for switch to prevent interaction with toolbar JS

Mar 08, 2018

1.9.2

Fixed Lists order in settings

Feb 09, 2018

1.9.1

Fixed settings dropdown definition

Feb 09, 2018

1.9.0

Added option to connect Rainlab.Blog posts and Records

Feb 09, 2018

1.8.1

Changed count() to mb_strlen() function in custom list type definition

Feb 06, 2018

1.8.0

Added new repeater tab Content blocks (specifically for website page builder blocks)

Feb 01, 2018

1.7.4

Temporary page reload solution to correctly refresh list after item(s) delete

Feb 01, 2018

1.7.3

Updated RecordDetail component partial

Jan 27, 2018

1.7.2

Fixed param type

Jan 27, 2018

1.7.1

Added option to specify detail page slug (for records component)

Jan 27, 2018

1.7.0

Added option to add images from Media Manager (with repeater) along with fileupload

Jan 13, 2018

1.6.3

Fixed records filter (Active)

Jan 13, 2018

1.6.2

Changed order of Create and NEW button. Fixed prev/next arrows in records.

Jan 13, 2018

1.6.1

Added button to add new item after create or update.

Jan 12, 2018

1.6.0

Added optional custom sorting of records

Dec 22, 2017

1.5.1

Fixed incorrectly defined testimonials repeater fields

Dec 21, 2017

1.5.0

Added option for Preview image selected from Media manager.

Dec 20, 2017

1.4.1

Added some more sorting columns (and check for allowed column types)

Dec 14, 2017

1.4.0

Added Categories component property to get only root categories. Fixed some translations.

Dec 13, 2017

1.3.1

Fixed default Tag slug for Records component

Dec 11, 2017

1.3.0

Added Tags to records list and Records component

Dec 11, 2017

1.2.0

Added limit function to Records component

Dec 11, 2017

1.1.10

Fixed recordDetail coponent code (thanks to https://github.com/onemedicare)

Nov 09, 2017

1.1.9

Added {{ record.getAttributeValueBySlug('slug') }} function.

Nov 03, 2017

1.1.8

Added {{ attribute.value }} and {{ record.getAttributeBySlug('slug') }} functions.

Nov 03, 2017

1.1.7

Improved Category component

Sep 17, 2017

1.1.6

Fixed typo in EN locale

Sep 17, 2017

1.1.5

Added navigation to next/previous record in a record edit form.

Sep 17, 2017

1.1.4

Added components for RecordDetail and CategoryDetail.

Sep 17, 2017

1.1.3

Experimental support for duplicate slugs (unique must be combination [list-slug]). Duplicates for now checked only by DB.

Sep 17, 2017

1.1.2

Added testimonials column.

Sep 17, 2017

1.1.1

Permissions for each Records list.

Sep 17, 2017

1.1.0

Import/Export for Records, Categories and Tags.

Sep 17, 2017

1.0.0

Initial version

Sep 12, 2017

Upgrade to version 3.0

This is a version with breaking changes!

I have unified naming for parameters and translation strings. Page slugs are now real slugs, so you have to change them to eg. {{ :record }} from previously used simple strings record.

Default components partials are updated and can server as examples.

Upgrade to version 2.0

Default components partials were updated to show all possible use of Small records data. Update your code if you have used them directly and try to use overriding partials method instead for future.

Components parameters has been extended but all existing parameters should work.