How to integrate the Kalooga Publisher into an external content management system (CMS)
This integration makes it possible to use the Kalooga Publisher Application from within any CMS in such a way that a Kalooga widget can easily be added to content, without going through the Kalooga Publisher Application workflow of creating a specific Kalooga widget for each content item.
This type of integration is called IntegratedPublisher Integration (read more about the different strategies). This method allows publishers to add so-called overloaded widgets to a page or an article in the CMS. These overloaded widgets are'variants' of an earlier made common Kalooga widget.
Requirements
As the overloaded widgets will be based on a common widget, a Kalooga widget has to exist for the publisher account. This widget can be created and edited within the (regular) Kalooga Publisher Application. The layout of the widget can be defined there, this appearance will not change for any widgets created with the PublisherIntegration.
The widgets created within the IntegratedPublisher will overload the query and preselections of the predefined widget.
PublisherIntegration Tool
http://publisher.kalooga.com/publisher/widgets/{pId}/{wId}/{oId}/integration[?query={query}&cat={cat}]
http://publisher.kalooga.com/publisher/widgets/{pId}/{wId}/{oId}/{apiKey}/integration[?query={query}&cat={cat}]
This url opens the PublisherIntegration Tool. The variables {pId} and {wId} stand for publisher identifier, widget identifier and API key respectively. Publisher identifier and API key are connected to your account, and widget identifier points to the widget you've configured for 'overrides'. The variable {oId} is provided by the cms environment. It has to be an unique id for a publisher, commonly it refers to a page, article, or post identifier as used in the CMS.
If you don't use an apiKey, you're required to login.
The optional query and cat parameters intitialize the search.
Create Kalooga gallery
Once logged in to the PublisherIntegration Tool the overloaded widget can be created. The PublisherIntegration Tool will create a custom 'overloaded' widget, based on the settings of the Widget identified by {wid}. This means that the query and appearance will be used to initialize the overload Widget.
As soon as the creation of the overloaded widget has been finished, this process can be finalized hitting the "Save" button. Clicking this button the overloaded widget will be saved on the publisher server.
Referring to the Widget from the CMS
http://publishing.kalooga.com/overloadWidget?publisherId={pId}&overloadId={oId}[&widgetId={wId}]
It's possible to get the javascript code associated with the overloaded widget. The mentioned url calls the service which will return the javascript code for the overloaded widget. It needs the publisher identifier {pId} and overload widget identifier {oId} as parameters. Together, they uniquely identify a Publisher Integration (a.k.a. overloaded) widget with a content item (existing of a query, category and preselections).
The optional widgetId parameter allows you to reuse the content item for {pId}+{oId} in a different widget.
This HTML code can be used in the cms to add the Kalooga widget to the cms content. Commonly, the code is used in templates as a javascript source, like:
<script src="http://publishing.kalooga.com/overloadWidget?publisherId={pId}&overloadId={oId}"/>