Skip to content

Instantly share code, notes, and snippets.

@wizhippo
Created September 21, 2016 15:20
Show Gist options
  • Save wizhippo/0d18689e8c09a6f103523fe3dfbdb99e to your computer and use it in GitHub Desktop.
Save wizhippo/0d18689e8c09a6f103523fe3dfbdb99e to your computer and use it in GitHub Desktop.
YUI.add('app-navigationhubviewplugin', function (Y) {
"use strict";
Y.namespace('MyApp');
Y.MyApp.NavigationHubViewPlugin = Y.Base.create('appNavigationHubViewPlugin', Y.Plugin.Base, [], {
initializer: function (config) {
var navigationhubview = this.get('host');
var zones = navigationhubview.get('zones');
zones.exampletab = "Example Tab";
navigationhubview.addAttrs({
exampletabNavigationItems: {
setter: '_buildNavigationViews',
writeOnce: true
}
});
navigationhubview.set('exampletabNavigationItems', [{
Constructor: Y.eZ.NavigationItemView,
config: {
title: "Example Tab",
identifier: "exampletab",
route: {
name: "studioPlusPresentation"
}
}
}]);
}
}, {
NS: 'MyApp'
});
Y.eZ.PluginRegistry.registerPlugin(
Y.MyApp.NavigationHubViewPlugin, ['navigationHubView']
);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment