70

Product support

Get help in the plugin support forum.

Categories

Custom fields for you RainLab.Blog Posts and Categories. Supports RainLab.Translate plugin.

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

Video manual

Using fields

post.getFields($name) - get post fields group by name

category.getFields('color') - get category fields group by name

<!-- display post  field -->
{% set group = post.getFields('val') %}
{{ group[0].mytext }}

<!-- display post repeated field -->
{% for item in post.getFields('items') %}
    <p>{{ item.var_in_repeater }}</p>
{% endfor %}

<!-- display category  field -->
{% set group = category.getFields('color') %}
<a style="color : {{ group[0].catcolor }}" href="{{ category.url }}">{{ category.name }}</a>

Example

post.htm

title = "post"
url = "/post"
layout = "default"
is_hidden = 0

[blogPost]
slug = "qwq"
categoryPage = 404

[blogCategories]
slug = "{{ :slug }}"
displayEmpty = 1
categoryPage = 404
==
<div class="container" style="margin-top: 100px">

    <div class="row">

        <div class="col-md-6">
           {% component 'blogPost' %}
           {% set group = post.getFields('val') %}
           {{ group[0].mytext }}
       </div>

       <div class="col-md-6">
        {% set  categories = blogCategories.categories %}
        {% for category in categories %}
        {% set postCount = category.post_count %}
        <li {% if category.slug == currentCategorySlug %}class="active"{% endif %}>
            <a href="{{ category.url }}">{{ category.name }}</a>

            {% set group = category.getFields('caltets') %}

            {{ group[0].catext }}

        </li>
        {% endfor %}

    </div>
</div>

</div>
1.0.8

update

Oct 05, 2020

1.0.7

Created table pkurg_blogcustomfields_category_values

Oct 05, 2020

1.0.6

Updated table pkurg_blogcustomfields_items

Oct 05, 2020

1.0.5

Updated table pkurg_blogcustomfields_items

Oct 05, 2020

1.0.4

Created table pkurg_blogcustomfields_items

Oct 05, 2020

1.0.3

Created table pkurg_blogcustomfields_values

Oct 05, 2020

1.0.2

Created table pkurg_blogcustomfields_fields

Oct 05, 2020

1.0.1

Initialize plugin.

Oct 05, 2020