Liveblogs

Configure the optional Liveblogs module for Sophora Web

Learn how to configure the Sophora Web Liveblogs module.

Configure Sophora Liveblogs in the Sophora DeskClient. To configure the Liveblogs module in Sophora Web, add a few lines to the Sophora Web application.yml.

Make Liveblogs creatable

Make sure that Liveblog documents are creatable. The relevant node type is sophora-liveblogs-nt:liveblog (or your Liveblog node type). Here is an example configuration:

creatable:
    - primaryType: sophora-content-nt:story
    - primaryType: sophora-liveblogs-nt:liveblog

Liveblog entries can be created directly from the live Liveblog view. You can also add your node type for liveblog entries to the list.

Make Liveblogs searchable

Make sure that Liveblog documents are searchable. The relevant node type is sophora-liveblogs-nt:liveblog (or your Liveblog node type). Here is an example configuration:

 search:
  sort: "sophora:modificationDate descending"
  searchable:
    - "sophora-content-nt:story"
    - "sophora-liveblogs-nt:liveblog"
    - "sophora-extension-nt:image"

Liveblog entries can be accessed via the Liveblog. You can make them searchable.

Enable the scripts for Pins and Top Entries

The client clientscriptdocument-liveblogs-toggle-pinned-entry and clientscriptdocument-liveblogs-toggle-top-entry control marking document entries as top entries or pinning them. Sophora Web implicitly lets you use these scripts from the Liveblog view: this is the preferred way to control top and pinned entries.

You can also enable these scripts as regular document actions. Add them to the Sophora Web toolbar as follows...

documentToolbar:
  # (...)   
  - id: script
    label: "Toggle Pin Entry"
    tooltip: "Toggle Pin Entry"
    scriptExternalId: "clientscriptdocument-liveblogs-toggle-pinned-entry"
    supportedNodeTypes:
      - "sophora-content-nt:liveblogEntry"
    iconName: "pin-outline"
    iconData: null
    canExecuteOnDirtyDocument: true
    activeOnUnpublishedDocumentsOnly: false
    shortcut: null
   
  - id: "script"
    label: "Toggle Top Entry"
    tooltip: "Toggle Top Entry"
    scriptExternalId: "clientscriptdocument-liveblogs-toggle-top-entry"
    supportedNodeTypes: 
      - "sophora-content-nt:liveblogEntry"
    iconName: "octagram-outline"
    iconData: null
    canExecuteOnDirtyDocument: true
    activeOnUnpublishedDocumentsOnly: false
    shortcut: null

If you want to use existing scripts in the Liveblog entries, add your Liveblog entry node type to the relevant script configurations. Here is an example configuration:

documentToolbar:
  - id: "script"
    label: "Resolve Twitter"
    tooltip: "Resolve Twitter"
    scriptExternalId: "social-media-script-resolve-twitter-urls"
    supportedNodeTypes:
      - "sophora-content-nt:liveblogEntry"
      - "sophora-content-nt:story"
# (...)

Last modified on 6/21/24

The content of this page is licensed under the CC BY 4.0 License. Code samples are licensed under the MIT License.

Icon