New features for the article formats in the News Show Pro GK5

With our latest template – Events, we have released also a new version of our News Show Pro GK5 module – v.1.6.1. This version contains two new and important features for the article formats functionality which makes this feature even more powerful.

Direct creation of the article format in News Show Pro GK5

Up to version v.1.6.0 of the News Show Pro GK5 module the creation of article formats required a separate *.format file. With the latest changes it is now possible to create an article format directly in the module options using a new textarea field visible when the article format option is enabled:

Events_-_Administration_-_Module_Manager__Module_News_Show_Pro_GK5

Please remember that the article format file option should be set to – – None selected – – -as in this case the module will use the textarea content as an article format output.

Support for K2 Extra Fields

K2 Extra Fields support is something that has often been requested by our users – and now we’ve added it to the article format’s functionality. The usage is very simple – in order to display the specific extra field the article format should contain the following string: {{extra_field_alias}}. So, for example, to show the eventhours extra field, the article format content should contain the following string: {{eventhours}}.

There are double curly brackets around the extra fields aliases in order to avoid overriding the existing replacement strings when the extra field alias is the same as the existing string.

Some extra fields contain an array of values i.e. extra fields with a Link type. For this situation we have implemented array handlers – {{extra_field_alias_X}} where X is the index of the array data value. For example; to show the event speaker name, which is the second element of the link array used as the label, the article format content should be: {{eventspeaker_1}}. The indexes work the same as in the array in that they are zero-based.

Usage

We have used these new features in our latest template – Events. It is used to display the hours of the events which are stored as an extra field in the K2 component:

Events

Below you can see an article format from the Upcoming Events News Show Pro GK5 instance:

{TITLE}

{TITLE}

{{eventhours}}

Ideas?

If you have any idea for improvements to the NSP GK5 module, feel free to suggest it on the official repository via the issues section.

Share
This article was first published July 10th, 2014