7

Product support

Get help in the plugin support forum.

Categories

This plugin add custom fields to CMS Pages and RainLab.Blog posts

Available field types: text, textarea, checkbox, number, codeeditor, colorpicker, datepicker, taglist, markdown, richeditor, mediafinder

Rainlab Blog Custom Fields

Video manual

Creating group fields

Go to Custom Fields Create group our cusom field Set Tab caption and target type page

Adding new fields.

Go to the blog post page and make sure that our fields are available.

Using fields

post.getField($name) - get field by name

{{ post.getField('name')}} 
{{ post.getField('customcolor')}} 
{{ post.getField('image') | media }} 
<img src="{{ post.getField('image') | media }}" />

post.getRepeatField - get repeated field by name

{% for item in post.getRepeatField('items') %}

    <p>{{ item }}</p>

{% endfor %}

Cms Page

Video manual

Creating group fields

  • Go to Custom Fields.
  • Create group our cusom field.
  • Set Tab caption and target type page.
  • Adding new fields.
  • Go to the CMS page and make sure that our fields are available.

Using fields

Simple {{ viewBag.group_fields_name[0].field_name }} where "firstfields" name of field

{{ viewBag.data[0].richtext | raw  }}
{{ viewBag.data[0].myitem | raw }}
<img src="{{ viewBag.data[0].image | media }} " >

{% for items in viewBag.items %}

    <p style="color:{{ items.itemcolor }}; font-weight: bold;" >{{ items.item }}</p>

{% endfor %}

API

Get API key

Settings->Custom Fields->API KEY

List of field groups

GET|HEAD | api/v1/fields/list

URL: GET http://oct.pkurg.ru/api/v1/fields/list?key=5d37221eed8a7

Response:

[
  {
    "id": 3,
    "type": "Blog",
    "name": "wwwwww",
    "custom_fields": [
      {
        "name": "ww",
        "type": "text",
        "caption": "ww",
        "comment": "wwww"
      }
    ],
    "caption": "New Tabwww",
    "created_at": "2019-07-23 06:19:23",
    "updated_at": "2019-07-23 06:19:23"
  },
  {
    "id": 6,
    "type": "Blog",
.................. and more

Show by field group id

GET|HEAD | api/v1/fields/{field}

URL: GET http://oct.pkurg.ru/api/v1/fields/5?key=5d37221eed8a7

Response:

{
  "id": 5,
  "type": "Blog",
  "name": "files",
  "custom_fields": [
    {
      "name": "mark",
      "type": "markdown",
      "caption": "My mark",
      "comment": "comment"
    }
  ],
  "caption": "Test New Tab",
  "created_at": "2019-07-23 07:47:48",
  "updated_at": "2019-07-23 07:47:48"
}

Create new fields group

POST | api/v1/fields

URL: POST http://oct.pkurg.ru/api/v1/fields?key=5d37221eed8a7

Payload:

{  
  "type": "Blog",
  "name": "filwesqqq",
  "custom_fields": [
    {
      "name": "mark",
      "type": "markdown",
      "caption": "My mark",
      "comment": "comment"
    }
  ],
  "caption": "Test New Tab 2"
}

Response:

'ok saved'

Delete fields group

DELETE | api/v1/fields/{field}

URL: DELETE http://oct.pkurg.ru/api/v1/fields/2?key=5d37221eed8a7

Response:

'ok deleted'
  • Found the plugin useful on 11 Jul, 2019

    This great plugin can expand your blog and CMS page in two clicks. This plugin can make a full-featured catalog from a blog. Everything works and everything is clear. Wish. Make it possible to manage the sequence of tabs.

2.0.6

Fixed permissions for settings

Jul 29, 2019

2.0.5

Fix

Jul 25, 2019

2.0.4

Add API

Jul 23, 2019

2.0.3

Add user permissions

Jul 10, 2019

2.0.2

Small update

Jun 11, 2019

2.0.1

Small update

Jun 11, 2019

2.0.0

Second version

Jun 11, 2019

1.0.6

Created table pkurg_customfields_tabvalueorder

Jun 11, 2019

1.0.5

Updated table pkurg_customfields_value_data

Jun 11, 2019

1.0.4

Updated table pkurg_customfields_value_data

Jun 11, 2019

1.0.3

Created table pkurg_customfields_fields

Jun 09, 2019

1.0.2

Created table pkurg_customfields_value_data

Jun 09, 2019

1.0.1

Initialize plugin.

Jun 09, 2019