The Add-on overs a global available Javascript API. With this API a Developer can create a blog by a template with a piece of code. 

You need your own Frontend or Button and the Create blogpost from template macro isn't enough for you - maybe this article is helping you. 

The starting point is this function:

Bitvoodoo.TemplatesForBlogPost.Controller.createDraft()

To get it work you need to apply an object with some parameters.

OptionRequiredDescriptionValue example
templateId (tick)The Id of the template you like to use.This is a number in such a format 56169698
spaceKey(tick)

The space where you like to create the blog.


"ds" or if you are already in space, you can use the global variable AJS.params.spaceKey
name(tick)The title of the blog post."My blog"
labels(error)Next to the attached labels of the template you can define additional labels for as much flexibility as you need.
[{"prefix":"global","name":"customlabel1"}

Examples

Just create the blog
var config = {
    templateId: 56169698,
    spaceKey: 'ds'
    name: 'Name of the post'
}

Bitvoodoo.TemplatesForBlogPost.Controller.createDraft(config);
Create a blog with additional labels
var config = {
    templateId: 56169698,
    spaceKey: AJS.params.spaceKey,
    name: 'Name of the post',
    labels: [{"prefix": "global", "name": "customlabel1"}, {"prefix": "global", "name": "customlabel2"}]
}

Bitvoodoo.TemplatesForBlogPost.Controller.createDraft(config);

Comments  (0)

Attachments  (7)

Add Attachment
  File Modified
PNG File image2017-6-14 12:58:7.png 14. Jun. 2017 by Oliver Sträßer
PNG File image2017-6-14 12:56:8.png 14. Jun. 2017 by Oliver Sträßer
PNG File image2017-6-14 12:55:35.png 14. Jun. 2017 by Oliver Sträßer
PNG File image2017-6-14 12:54:54.png 14. Jun. 2017 by Oliver Sträßer
PNG File image2017-6-14 12:53:52.png 14. Jun. 2017 by Oliver Sträßer
PNG File image2017-6-14 12:53:10.png 14. Jun. 2017 by Oliver Sträßer
PNG File image2017-6-14 12:52:40.png 14. Jun. 2017 by Oliver Sträßer