The JSON Edition allows you to access several settings that are not available in the GoodBarber backend.
You can access the JSON Edition in the JSON tab in the configuration of each of your settings. 

This option is included in the Full offer, or is available for $4/month (or $40/year). Of course, you can test it for free before buying it. You must activate it from the Extension Store menu in your back office. 
The full documentation of the attributes that can be modified using the JSON Edition is available in the Settings > Other Settings > JSON Documentation menu.
Here are some examples of modifications that can be done using the JSON Edition.
All the examples below are made on a single page: if you want to apply the modifications to several pages, you need to repeat the operation on each page.



Enable the "Save to library" option in Photo pages

This features allows your users to save a picture from a Photo page into their phone's library, with a long tap on the picture in the detail page of the page.
To enable this option, you need to set the sections/[ID]/saveImgEnabled  to 1 in the JSON Edition. If the attribute doesn't exist, you need to add it.



Modify the tokens used in a list of articles or videos

If you want to display other information, such as subtitles, in the lists of content (by default it's "Author on Date"), you can modify the sections/[ID]/infosContentType attribute.
As usual, it works with tokens.
Example: in this video, we have removed the author's name, and choose to use another date formatting.



Change the way the pager is diplayed in the header

In the detail page of the Photo page, the header shows a pager ("1 / 24" by default).
You can change the format of this string by modifying the sections/[ID]/detail/navBarTitleToken attribute.
The tokens that can be used in the case are [CURRENT] and [TOTAL].
Example: in the video, I change the display from "10 / 24" to "10 of 24".



Adding a "Read full article" link in the detail pages

Sometimes, if you really need to use an RSS feed that doesn't contain the full content of the items, you may want to add a "Read full article" link in the detail pages. 
To do so, you need to modify the sections/[ID]/detail/htmlTemplate attribute. If it doesn't exist, the default setting will be used. Add a new attribute to override the default setting.

Keep the same structure, and just add a link at the end of the template, using the [URL_ITEM] token :
.....<a href="[URL_ITEM]">Read full article</a>


Tokens that can be used

- [TITLE] : Title of the article / video
- [DATE] : Date of publication, in the default format
- [HOUR] : Hour of publication
- [AUTHOR] : Author of the article / video
- [CONTENT] : Full content (description) of the article / video
- [EMBEDHTML] : HTML embed code of the video (used only in the detail page of the video pages)
- [DURATION] : Duration of the video (used only in video pages)
- [VIEWS] : Views of the video (used only in video pages)
- [ADDRESS] : Address of the event (used only in event pages)
- [NBCOMMENTS] : Number of comments in the items 
- [CURRENT] : Position of the picture in the list (used only in photo pages)
- [TOTAL] : Total number of pictures in the list (used only in photo pages)
- [URL_ITEM] : URL of the item on its source


Alternative date formats

The date format of the [DATE] token can vary regarding the language of your app, but it's always a short date style ("01/03/2014").
You can use these tokens instead of [DATE] to display another date format.
- [DATETXT1] : Thursday, January 2nd 2014
- [DATETXT2] : January 2nd 2014
- [DATETXT3] : Thursday, January 2nd
- [DATETXT4] : 01/02/2014
- [DATETXT5] : 01/02
- [DATETXT6] : 01/2014
- [DATETXT7] : January 2014
- [DATETXT8] : January

More articles