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
- Translate content and URL slugs
Small Records works with other plugins
Rainlab Blog - you can assign records to your blog posts
Rainlab Transate - you can translate content and URL slugs
More to come...
Read a Basic use case part at the end of the Documentation to start quickly working with Small Records.
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 are some 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
Tag
with URL/tag/:tag
- Add component Small Records > Tag
- 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 tags and records listed.
All records, categories and tags 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.
Add custom records form fields
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 form fields
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: Tags
Put default partial {% component 'tags' %}
in your layout/page/partial to inspect how to work with tags 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.
Single tag page
Create a CMS page with name Tag
and URL /tag/:tag
.
Select its layout Default
.
From left pane add a Small Records > Tag 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 and tag and to click on records to see a detail.
HOWTO
Getting records with scopes
Record::isActive()->area('news')->tag('important')->limit(6)->get();
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.
-
Max
Found the plugin useful on 9 Feb, 2022
This small plugin is Must have in every project. For small sites with any kind of lists or records. IMHO field with markdown should be added to the record fields. Thanks Jan !
-
Jan Vince author
Replied on 9 Feb, 2022
Thanks Max, I appreciate it.
I'll add Markdown to my to-do list :)
-
Taï-nui
Found the plugin useful on 31 Oct, 2021
Not enough thumbs for this plugin and its author. I really advice beginners (and not only) to go exploring the code which is very inspiring and open eyes on the potential of the CMS.
-
Ostlancer FZE LLC
Found the plugin useful on 5 Nov, 2020
You are cool, thanks a lot, man that you made it also with import/export!
-
Nick Wong
Found the plugin useful on 2 Nov, 2020
useful
-
Sava
Found the plugin useful on 24 Jul, 2020
Awesome plugin really helped with the project I had.
-
Jan Vince author
Replied on 24 Jul, 2020
Thank you :)
Best regards,
Jan
-
Inna
Found the plugin useful on 22 Jul, 2020
Great plugin! But is it possible to implement search for records on website?
-
Jan Vince author
Replied on 22 Jul, 2020
Hi and thank you.
Search is not available out of the box, but data are in a collection, co you can use (basic) search using collections methods.
Best regards,
Jan
-
EddyShivers
Found the plugin useful on 17 Jun, 2020
Awesome work Jan Vince. This looks really good. I am excited to start using it. I hope you'll have time to continue updating it.
-
Jan Vince author
Replied on 17 Jun, 2020
Thank you :)
-
Trigital Hub
Found the plugin useful on 7 Jun, 2020
Nice plugin... However, I'm having an issue. The single record page is not displaying my portfolio record... Is there something I'm not doing right?
-
Jan Vince author
Replied on 8 Jun, 2020
Hi and thank you.
Please add an issue on GitHub with more info about your problem.
-
hibangmike
Found the plugin useful on 28 May, 2020
This is really useful plugin ! I even don't use rainlab blog plugin anymore and just use this instead.
Combine this with pages plugin, it creates client-friendly backend ! Very very appreciated with this plugin. four thumbs up !
-
Jan Vince author
Replied on 28 May, 2020
Thank you :)
Best regards,
Jan
-
Devin Green
Found the plugin useful on 18 Jan, 2020
Amazing plugin. I use this in so many places. My clients love it as well
-
Jan Vince author
Replied on 20 Jan, 2020
Thank you!
-
Dinu Lucian
Found the plugin useful on 20 Sep, 2019
Great plugin! Question: How can I add support for SiteSearch ... I want to be able to search through records.
-
Jan Vince author
Replied on 21 Sep, 2019
Hi and thank you!
I have SiteSearch support on my todo list but had no time to implement it.
You can create GitHub issue and maybe help with PR if you need this quickly.
Best regards,
Jan
-
JBelcastro
Found the plugin useful on 8 Mar, 2019
Great plugin! I was amazed at how well it solved my particular use-case.
-
Jan Vince author
Replied on 8 Mar, 2019
Thank you!
Jan
-
Hinxman
Found the plugin useful on 22 Dec, 2018
After working with data for over 20 years, I can humbly say that what we have here is something small but remarkable. It has an element of genius, if not ingenious.
The component provides an adaptable way of creating records data. It has generic data solutions to common needs such as lists, page content storage, testimonial storage, image upload description and linking. Dig a little deeper and you see flexible, user defined record attributes which can contain values. You can also have your own tag group allocation to classify each of your record your entries.
The category allocation, of each entry, is properly structured so that it can be grouped and sub-grouped. You can apply a main category and also subcategories to which each entry belongs.
The whole structure of data entry is controlled by an area profile by which the list item is defined.
I recommend looking deeply into this component and considering it for your project. You will find that it can present a generic way to enter different and diverse record list types in your website.
The only thing I find missing is proper examples of how you can implement its features. I'm not surprised by this because it can be adapted in so many ways.
Overall it's a small example of genius.
Best regards,
Anton
-
Jan Vince author
Replied on 24 Dec, 2018
Hi and thank you!
-
Andrey Pomortsev
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!
-
Jan Vince 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.
-
Darjan Zlobec s.p.
Found the plugin useful on 31 May, 2018
Very versatile plugin. Thumbs up!
-
Jan Vince author
Replied on 31 May, 2018
Thank you!
-
Ethan
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!
-
Jan Vince 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 -
Marcel Irmler
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?
-
Jan Vince 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 %}
-
A. Rizhenkov
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)
-
Jan Vince author
Replied on 5 Oct, 2017
Thanks and I will check GitHub for your issues!
-
3.14.1 |
Fixed invalid YAML (thanks LukeTowers) Aug 30, 2022 |
---|---|
3.14.0 |
Added random order for Records component Jan 22, 2022 |
3.13.0 |
Renamed Record scope area() to byArea() to prevent relation override (thanks xtsidx). Sep 20, 2021 |
3.12.0 |
Fixed exporting filtered by list Jun 30, 2021 |
3.11.0 |
Added option to export and import media_images for records Jun 30, 2021 |
3.10.4 |
Fixed typo in url column size Mar 15, 2021 |
3.10.3 |
Fixed url column size and type Mar 15, 2021 |
3.10.2 |
Changed url column size (thanks zlobec) Mar 15, 2021 |
3.10.1 |
Fixed redirect after create new record Jan 05, 2021 |
3.10.0. |
Added model scopes (thanks xtsidx) Nov 18, 2020 |
3.9.1 |
Added missing message (thanks xtsidx) Nov 13, 2020 |
3.9.0 |
Added romanian translation (thanks luciandex) Oct 24, 2020 |
3.8.4 |
Added russian translation (thanks xtsidx) Oct 19, 2020 |
3.8.3 |
Fixed problem when TEXT column is not changed to MEDIUMTEXT in migration Oct 10, 2020 |
3.8.2 |
Changed content_blocks column type to larger mediumText (thanks xtsidx) Oct 10, 2020 |
3.8.1 |
Slovenian translation (thanks zlobec) Oct 09, 2020 |
3.7.1 |
Added missing index in the Breadcrumbs URL (thank zlobec) Oct 08, 2020 |
3.7.0 |
Added empty slug test to detail components to speed up resolving them Oct 22, 2019 |
3.6.2 |
Small typo fix (thanks thistehneisen) and better 404 handling (thanks zlobec) Sep 16, 2019 |
3.6.1 |
Changed slug validation to allow size from one letter Sep 16, 2019 |
3.6.0 |
Added tags and tagDetail components Apr 13, 2019 |
3.5.0 |
Added option to edit record's author Apr 08, 2019 |
3.4.0 |
Slugs are now translatable in Records component Apr 04, 2019 |
3.3.3 |
Disabled default category image size (was 260x260px) Mar 26, 2019 |
3.3.2 |
Fixed bug in transWhere query for CategoryDetail and RecordDetail component Feb 26, 2019 |
3.3.1 |
Fixed bug in CategoryDetail component Feb 07, 2019 |
3.3.0 |
Slugs are now translatable in RecordDetail and CategoryDetail components (thanks kosmonowt) Jan 28, 2019 |
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.