Open the menu

    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 CommentIt service, simply instantiate it in a channel and drag its single interface to the page containing the content where you wish to allow users to post comments.

    • CommentIt Scripts: This interface is responsible for calling the jQuery plugin that renders and controls the service, and selects elements on 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 enableComments of the Comment Scripts XSL interface.

    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 some subgroup of those selected elements from receiving the rendering of the CommentIt service is to add to those elements the attribute "data-lum-social-support" with a value different from "true", such as "false". For the standard interfaces of the Lumis services, one way to do this is by customizing your XSL, adding the following template:

    To perform more complex selections of which elements on the page should receive the rendering of the CommentIt service, you should customize the XSL of the CommentIt Scripts interface by altering the template enableComments, modifying the query that selects these elements.

    Through changes to the template enableComments, it is also possible to alter the HTML structure rendered by the jQuery plugin. To do this, you must write the new rendering methods and send them as a parameter in the call to the main function of the plugin.