Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


For example, if the Landing Page template is loaded with workspaces and if the workspace needs to be clicked to open its subworkspaces, a click event can be binded to initiate the click and load the subworkspaces.


Example:

Code Block
languagephp
applyTemplate: function(template, tmpClass) {
if (!canvas.core.isEmpty(this.parentElem)) {
$(this.parentElem).append(template); 
} 
$(this.parentElem).find('.workspaceIconBlock').on('click', function(e) {
var workspaceID = $(this).attr('data-itemid');
canvas.workspace.metadata.getWorkspaceManager().getContainer().switchWorkspace(workspaceID);
}); 

...