The use of plugin MiniCCK
Install and publish the plugin "System - MiniCCK".
You can add custom fields in the plugin settings . There you can add any amount of different types of fields to the content. Add a field by pressing the button " Add Field "
Must be registered to each field:
- Field Name - service name consisting only of letters, numbers and the underscore _ in lowercase. No other symbols are permitted, including space .
- Field title - This is the title that you see in the administration panel in the extra content fields and the user on the front of your website. For multilingual sites here can inscribed language constants, which will be processed according to the language of the content .
- Field type - a drop-down list where you must select the type of created field. This settings determines how will look the field in the administrative part of the website, on the front-end will be displayed the information you entered or selected .
- Field parameters - it is a field for inputting extra options for the content field. It operates only for that field types: drop-down list, radio buttons, checkboxes. Here should be entered pairs key - value separated by double colons (::), each following pair must be on the next line . For a field of type " image " here should be entered the path to the folder of images from the root of the website. If you do not want to restrict the media manager with some folder, type "/" , otherwise the plugin will take the default value "/images/".
You can delete a field with "Delete Field" button. It's located opposite each field/
In the editing content panel in the com_content component, after installing and setting the plugin and the patch, on the right bottom will appear a new tab "Extra fields" in which you have to enter or select values ??for the fields that you have created . After saving the content when viewing the content from the front-end of your website, there will be your extra information.
Field Output Variants
With version 1.3 of the plugin provides two ways to display extra fields:
- Method "HTML" implements a typical output connection template plugin to text content , as was the case in previous releases of the plugin.
- Method "Object " is much more flexible , but is designed for professionals as it does not have its own representation, and adds the object to the object MiniCCK $ article, which allows to operate the fields in the template plugin com_content. This adds great flexibility in the output fields - you can display any field anywhere plugin template content, but requires webmaster skills working with templates .
To display fields plugin "object" provides two functions - this header field and the output value of the field. The template com_content so you can call them:
With version 2.2 added function returned content type (content type is useful to know to switch layouts and etc.) and function returned clear field data.
Content type can be obtained as follows:
Clean field data can be obtained as follows:
To obtain an associative array of all article fields are so:
With version 1.4 templates are fields ( not to be confused with the general template of the plugin) , as well as the ability to override them in the template Joomla.
To override the main template plugin copy it from
After that, the plugin will use the template in the template site folder.
So as you can do with fields templates. Copy
After overriding the field templates and plugin main template, you can safely upgrade them without fear that they erased from upgrade.