Customizing the Confluence dashboard: velocity or web panel?

I'd like to customize our dashboard in Confluence (server v6.0) so that a new web panel is displayed instead of the default All Updates (see screenshot for example). Ideally, I'd like to add it as the first option under the DISCOVER menu before the All Updates and Popluar options tabs. The web panel will display some custom graphics and HTML.

I'm wondering if it's possible to do this by just modifying the Velocity template for the dashboard (under Admin > General config > Look and Feel > Layouts > Global Layout), or if I'd need to develop a plugin. I've completed a number of plugin development tutorials, and this doesn't seem that challenging, but I'm not too familiar with the environment yet.

I know I could set a different page as the landing page, but I like the other menus available on the dashboard, and so want to pursue this option. Any advice or guidance is appreciated!

custom_confluence_dashboard.png

1 answer

1 accepted

Just FYI I was able to do this with the Custom HTML feature (no plugin or velocity changes necessary).

 

<script>
var customDashboardMenu = '<div style="padding-top:10px;" class="aui-sidebar-gropu aui-sidebar-group-tier-one spa"> <div class="aui-navgroup-inner"> <div class="aui-nav-heading"> <strong class="title-nav-group">Company News</strong> </div> <ul class="aui-nav nav-items default-list-view"> <li id="roadmap-link" class="nav-item-container-roadmap"> <a href="#roadmap" class="aui-nav-item" original-title="Company Roadmap"> <span class="aui-icon aui-icon-small icon-all-updates"> </span> <span class="aui-nav-item-label">Company Roadmap</span> </a> </li> <li id="newsletters-link" class="nav-item-container-newsletters"> <a href="#newsletters" class="aui-nav-item" original-title="Team Newsletters"> <span class="aui-icon aui-icon-small icon-all-updates"> </span> <span class="aui-nav-item-label">Team Newsletters</span> </a> </li> </ul> </div> </div>';

var roadmapContent = '<div id="roadmap"><h1>COMPANY ROADMAP</h1></div>';
var newslettersContent = '<div id="newsletters"><h1>TEAM NEWSLETTERS</h1></div>';

AJS.toInit(function(){
AJS.$('.aui-sidebar-body nav.aui-navgroup-vertical div.aui-navgroup-inner').prepend(customDashboardMenu);

AJS.$('#roadmap-link').click(function(e){
AJS.$('.aui-page-panel div.aui-page-panel-inner section.aui-page-panel-content div').hide();
AJS.$('.aui-page-panel div.aui-page-panel-inner section.aui-page-panel-content').append(roadmapContent);
AJS.$('li').removeClass('aui-nav-selected');
AJS.$('li.nav-item-container-roadmap').addClass('aui-nav-selected');
e.preventDefault();
});

AJS.$('#newsletters-link').click(function(e){
AJS.$('.aui-page-panel div.aui-page-panel-inner section.aui-page-panel-content div').hide();
AJS.$('.aui-page-panel div.aui-page-panel-inner section.aui-page-panel-content').append(newslettersContent);
AJS.$('li').removeClass('aui-nav-selected');
AJS.$('li.nav-item-container-newsletters').addClass('aui-nav-selected');
e.preventDefault();
});

AJS.$('#allupdates-link').click(function(e){
alert("text text text");
AJS.$('#roadmap-link').removeClass('aui-nav-selected');
e.preventDefault();
});

});
</script>

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

381 views 21 10
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you