Plugin Development - Creating new navigation item for Repository

Hi, I’m trying to add a navigation item to the repository view. Struggling to understand how to replicate the behavior seen when clicking on links such as Source, Commits, Branches, etc. They don’t navigate the user away from the page but it replaces the contents on the page with relevant information related to what was just clicked.

I’ve got the web-item showing up just fine and navigating using servlets, but I want the behavior to mimic the already existing navigation items. Do I need to introduce a web-panel? How do I conditionally show that web-panel instead of other ones when a link is clicked? Any guidance would be much appreciated!

Picture Example: I want everything inside the yellow border to be replaced by a new view that shows a Changelog when the Changelog navigation link is clicked.

Current web-item

  <!-- Web Items -->
  <web-item name="changelog" key="changelog" section="bitbucket.repository.nav" weight="1000"> 
    <param name="iconClass" value="aui-icon aui-icon-small aui-iconfont-document-filled"/>  
    <description>Changelog</description>  
    <label>Changelog</label>
    <!-- <link>/plugins/servlet/changelog/repository/${repository.project.key}/${repository.slug}</link>  -->
    <link>/projects/${repository.project.key}/repos/${repository.slug}/changelog</link>
  </web-item>