Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
34 lines (28 sloc) 1.58 KB
title
Templates

Plugins Templates

Kepler implements a convenient mechanism to give plugins the ability to extend the platform's basic UI structure. Using the dynamic template pluginsTemplate and register the plugin's templates inside the plugin.js in the section templates.

Here an example of templates for the plugin keplerjs:share

K.Plugin({
    name: 'share',
    templates: {
        panelPlace: {name:'panelPlace_share', order:-5},
        popupCursor: 'popupCursor_share',
        popupUser: 'popupCursor_share'
    }
});

Any plugin can be define one or many templates to include in default template placeholders panelPlace, popupCursor,popupUser. At the property panelPlace is also specified the priority(order) of inserting the template respect to the other plugins, this value can be between -10 and +10

The templates positioned inside the template panelPlace and popupCursor

<template name="panelPlace">
...
    {{> pluginsTemplate name='panelPlace'}}
...
</template>

A complete list of default extensible templates is defined in K.templates