Which Dojo Topics are published in the Episerver CMS UI?

blog header image

If you, like me are venturing into the mythical and magical world of dojo-in-episerver-ui, where elfs and wizards rule, you might also find this list useful.

A key element in the Episerver UI are the dojo topic publish/subscribe system that is used to let all the components communicate. When it comes to dojo and Episerver, my skills usually only take me so far that I can get myself into trouble, but rarely out of it, so I'm not going to give a full explanation here, but leave that to someone who truly has studied the dark arts: Grzegorz Wiechec: 
https://gregwiechec.com/2015/08/using-dojo-topic-publish-and-topic-subscribe/.

But, I have learned that you can learn a lot by studying the Episerver UI Sources. They can either be downloaded as a nuget package, or you can (like me) unzip the file /modules/_protected/CMS/CMS.zip and take a look through the ClientResources (hidden below the folder with the current version number). Look for the .uncompressed.js files!

The topics for example are quite powerful as they can both be used to control the UI by sending them out through topic.publish, or you can react to any events going on in the system by setting up eventhandlers with topic.subscribe.

I did a search in files and cleaned up the results a bit to give a nice overview of which topics are published from where that I thought might come in handy to others than myself, so here goes:

asset\command\ChangeContextToSelection
"/epi/shell/context/request", { uri: target.uri }

asset\command\NewFolder
"/epi/cms/action/createlocalasset"

asset\command\TranslateSelectedContent
"/epi/shell/action/changeview", "epi-cms/contentediting/CreateLanguageBranch", null, data

asset\view-model\HierarchicalListViewModel
"/epi/cms/contentdata/childrenchanged", target.parentLink

BackContextHistory
"/epi/shell/context/request", uri, { sender: sender }

command\BackCommand
"/epi/shell/context/request", { uri: this._previousContent.uri }, { trigger: "back", sender: this }

command\DeleteContent
"/epi/cms/action/delete/error"

command\EditImage
"/epi/shell/context/request", { url: returnValue.src }, { forceReload: true }

command\NewContent
"/epi/shell/action/changeview", "epi-cms/contentediting/CreateContent", null, {

command\TogglePreviewMode
"/epi/shell/action/changeview", "view"
"/epi/shell/action/changeview", null

command\ToggleViewSettings
"/epi/cms/action/eyetoggle", this.model.getthis.property)

command\TranslateContent
"/epi/shell/action/changeview", "epi-cms/contentediting/CreateLanguageBranch", null, data

compare\command\CompareSettingsModel
"/epi/shell/action/changeview/updatestate", { viewName: null }
"/epi/shell/action/changeview", this.get"enabled") ? this.get"mode") : null, null, { forceReload: true }

compare\views\CompareView
"/epi/shell/context/request", { uri: uri }, { sender: this }
"/epi/shell/action/changeview", "formedit", null, null, true

compare\views\SideBySideCompareView
"/epi/shell/context/request", { url: url }, {

component\command\ChangeContext
"/epi/shell/context/request", { uri: this.model.uri }, {

component\command\GlobalToolbarCommandProvider
"/epi/layout/pinnable/navigation/toggle"
"/epi/layout/pinnable/tools/toggle"

component\command\SetCommonDraft
"/epi/cms/content/statuschange/", "common-draft", { id: item.contentLink }

component\command\ViewTrash
"/epi/shell/context/request",

component\ContentNavigationTree
"/epi/shell/context/request", { uri: page.uri }, {

component\Versions
"/epi/shell/context/request", { uri: uri }, callerData

content-approval\ApprovalService
"/epi/shell/context/request",

contentediting\AutoSaveButton
"/epi/cms/action/showerror"

contentediting\command\BlockEdit
"/epi/shell/context/request", {

contentediting\command\IgnoreInUseNotification
"/epi/shell/context/request", contextParameters, callerData

contentediting\command\Publish
"/epi/cms/contentdata/childrenchanged", versionAgnosticId

contentediting\command\SendForReview
"/epi/cms/action/disableundoredoactions"

contentediting\command\_ChangeContentStatus
"/epi/shell/context/request", contextParameters, callerData

contentediting\command\_LegacyDialogCommandBase
"/epi/cms/contentdata/updated", {

contentediting\ContentEditingValidator
"/epi/cms/action/showerror"
"/epi/cms/action/showerror"

contentediting\ContentModelServerSync
"beta/contentSaved", result

contentediting\ContentViewModel
"/epi/shell/context/request", contextParameters, { sender: this, contextIdSyncChange: true, trigger: "internal" }
"/epi/shell/context/request", contextParameters, { sender: this, forceReload: true }
"/epi/shell/context/request", contextParameters, { sender: this }
"/epi/cms/content/statuschange/", "common-draft", { id: newVersion.contentLink }
"/epi/shell/context/request", contextParameters, { sender: this }
"/epi/cms/content/statuschange/", status, resolveArgs
"/epi/cms/action/showerror" 

contentediting\CreateContent
"/epi/cms/action/createlocalasset"
"/epi/cms/action/showerror"
"/epi/shell/context/request", {
"/epi/shell/action/changeview/back"
"/epi/cms/action/togglecreatemode", true
"/epi/cms/action/togglecreatemode", false

contentediting\EditingBase
"/epi/layout/pinnable/propertyEditor/show", null

contentediting\editors\model\ContentReferenceListEditorModel
"/epi/shell/context/request", { uri: uri }, { sender: this }

contentediting\EditToolbar
"/epi/cms/action/undo", []
"/epi/cms/action/redo", []

contentediting\OnPageEditing
"/epi/cms/action/switcheditmode", null, { activePropertyOnStartup: property}

contentediting\PageDataController
"/epi/cms/action/disablepreview"
"/epi/cms/action/showerror"
"/epi/shell/action/changeview/updatestate", { viewName: viewName }
"/epi/shell/context/request", contextParameters, callerData

contentediting\viewmodel\DeviceSelectionSettingsModel
"/epi/cms/action/viewsettingvaluechanged", messageData

contentediting\viewmodel\LanguageSettingsModel
"/epi/cms/action/eyetoggle", enabled
"/epi/cms/action/viewsettingvaluechanged", "viewlanguage", value

ContextSynchronizer
"/epi/shell/context/updateRequest", data

notification\viewmodels\NotificationListViewModel
"/epi/shell/context/request", { uri: contextUri }, { sender: this, forceReload: true }

project\ProjectPreviewButton
"/epi/cms/action/viewsettingvaluechanged", "project", projectId

project\ProjectSchedulingDialogViewModel
"/epi/shell/context/request", { uri: item.contentUri }

project\viewmodels\OverviewViewModel
"/epi/shell/context/request", { uri: newProjectUri }, { sender: this }

project\viewmodels\ProjectModeToolbarViewModel
"/epi/shell/context/request", { uri: context.versionAgnosticUri }, { sender: this }
"/epi/shell/context/request", { uri: newProjectUri }, { sender: this }

project\viewmodels\_ProjectViewModel
"/epi/shell/context/request", context, { sender: this }

visitorgroups\command\VisitorGroupViewSettingsModel
"/epi/cms/action/viewsettingvaluechanged", "visitorgroup", this.selectedGroup

widget\Breadcrumb
"/epi/shell/context/request", { uri: content.uri }, { sender: this }

widget\command\CreateContentFromSelector
"/epi/shell/action/changeview", "epi-cms/contentediting/CreateContent", null, {

widget\ContentTreeStoreModel
"/epi/cms/contentdata/childrenchanged", targetItem.contentLink
"/epi/cms/contentdata/childrenchanged", sourceItem.parentLink
"/epi/cms/action/createlocalasset"
"/epi/shell/context/request", { uri: ViewSettings.settings.defaultContext }

widget\ContextualContentForestStoreModel
"/epi/cms/action/createlocalasset", self

widget\SearchBox
"/epi/shell/context/request", [contextParameters, { sender: null }]

widget\viewmodel\TrashViewModel
"/epi/cms/trash/empty", response.extraInformation

widget\ViewSelector
"/epi/cms/action/disablepreview"
"/epi/shell/action/changeview", view.key, null, null, true

widget\ViewSwitchButton
"/epi/cms/action/switcheditmode", null, null, true

widget\_GridWidgetBase
"/epi/shell/context/request", contextParameters, callerData

_SidePanelsToggleMixin
"/epi/layout/pinnable/navigation/toggle", this._isNavigationVisible
"/epi/layout/pinnable/tools/toggle", this._isToolsVisible
"/epi/layout/pinnable/navigation/toggle", false
"/epi/layout/pinnable/tools/toggle", false

Recent posts