Scripting and interfaces

Build 1501 on 14/Nov/2017  This topic last edited on: 28/Oct/2016, at 11:47

Scripting

The most operations needed by the VirtualCom integration are performed by the following TedSystemAddin scripts:

SelectVirtualComTemplate : open template selection dialog to change section layout

UpdateVirtualComTemplate : perform template change when pressing OK to the above dialog

VirtualComSync : check if some GN4 content is currently published but not in staging, to avoid content wipe on next publish. If desired, the staging list will be updated.

VirtualComRefreshPos : after a preview is rendered, get real article positions from HTML (vcpos attribute). Used for mixing gn4 and VirtualCom content.

OnPreviewReadyVirtualCom (event) : called when a new preview is ready in the browser.

OnListDrop (event) : used for VirtualCom section to recalculate position after a drop from navigator or object list.

VirtualComShowDrop : toggle "GN4Pos" CSS style for all divs with vcpos attribute defined (drop zone).

VirtualComSwap: enabled when two items are selected to swap their positions. Linked to Alt+S.

Interfaces

List of commands available in the VirtualCom REST interface (http://ww2.virtualcms.it/gn4dev/GNWebDo.jsp?cmd=......):

GetTemplates: returns id and template name list of all available templates. See SelectVirtualComTemplate.

GetTemplate: returns template id of the given section (&section=XXX). See SelectVirtualComTemplate.

SetTemplate: set a new template id for a section (&section=XXX&layout=YYY). See UpdateVirtualComTemplate.

GetPositions: get GN4 articles and published positions in a section (&section=XXX) for pudbest sync. See VirtualComSync.