Skip to content

Instantly share code, notes, and snippets.

@communiteq
Created February 8, 2017 18:59
Show Gist options
  • Save communiteq/96b161a23dc4d0f80e2ea054cec876a1 to your computer and use it in GitHub Desktop.
Save communiteq/96b161a23dc4d0f80e2ea054cec876a1 to your computer and use it in GitHub Desktop.
Discourse site customization: Extra items in 'Category' menu
{"site_customization":{"id":6,"name":"Extra items in Category menu","key":"a82e17bf-7dc9-4409-b951-1453dd118c0e","enabled":true,"created_at":"2016-12-23T17:37:47.056Z","updated_at":"2016-12-23T18:00:45.824Z","stylesheet":"","header":"","footer":"","top":"","mobile_stylesheet":"","mobile_header":"","mobile_footer":"","mobile_top":"","head_tag":"","body_tag":"\u003cscript\u003e\n\n Discourse.ExternalNavItem = Discourse.NavItem.extend({\n href : function() {\n return this.get('href');\n }.property('href')\n });\n\n I18n.translations.en.js.filters.item1 = { title: \"Item 1\", help: \"Tooltip 1\" };\n I18n.translations.en.js.filters.item2 = { title: \"Item 2\", help: \"Tooltip 2\" }\n\n Discourse.NavItem.reopenClass({\n buildList : function(category, args) {\n var list = this._super(category, args);\n if(!category) {\n list.push(Discourse.ExternalNavItem.create({href: '/link1', name: 'item1'}));\n list.push(Discourse.ExternalNavItem.create({href: '/link2', name: 'item2'}));\n }\n return list;\n }\n });\n\n \u003c/script\u003e","embedded_css":""}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment