Assembly
This section refers to the assembly of the service by the portal administrator for the end user of the solution. There is no assembly of the administrative content environment for the content editor.
To use the LikeIt service, simply instantiate it in a channel and drag its only interface to the page containing the content for which you want to allow users to express their liking.
- LikeIt Scripts: This interface is responsible for calling the jquery plugin that renders and controls the service, and selects elements from the page to apply it.
By default, the jquery plugin renders an HTML structure at the end of all elements selected by the query in the template enableLikes of the LikeIt Scripts interface xsl.
This query, by default, selects all HTML elements that are an <article>
with the class " lum-content
", which have the attribute " data-lum-entityid
" and do not have the attribute " data-lum-social-support
" or have this attribute equal to " true
".
A quicker way to prevent any sub-group of these selected elements from receiving the LikeIt service rendering is to add the attribute "data-lum-social-support" with a value different from "true", such as "false". For the standard interfaces of Lumis services, one way to do this is by customizing your xsl, adding the following template:
To make more complex selections of which elements on the page should receive the LikeIt service rendering, the xsl of the LikeIt Scripts interface must be customized by altering the template enableLikes, changing the query that selects these elements.
Through changes in the enableLikes template, it is also possible to change the HTML structure rendered by the jquery plugin. To do this, new rendering methods must be written and sent as a parameter in the main function call of the plugin.
Permission Assignment
For the user to add and remove their like record for content, the portal administrator must grant them the "Like" permission. This permission is granted in the access control of the service instance.