Skip to content

Use memberLayout=separatePages, but don't show the Properties/Methods etc. in the sidetoc #9226

Answered by michfuchs
michfuchs asked this question in Q&A
Discussion options

You must be logged in to vote

I eventually got it to work, so answering my own question:

In templates\my-template\styles\docfx.js:

function renderSidebar() {
    var sidetoc = $('#sidetoggle .sidetoc')[0];
    if (typeof (sidetoc) === 'undefined') {
      loadToc();
    } else {
      //<customized>
      // Filter out nodes with the names "Constructors"/"Fields"/"Properties"/"Methods" and their descendants
      var elementsToRemove = $('a[title="Constructors"], a[title="Fields"], a[title="Properties"], a[title="Methods"]');
      elementsToRemove.each((i, e) => {
        var ul = e.closest('ul');
        $(ul).hide();
      });
      //</customized>
    (...)
}

There was an issue with the breadcrumb after that, fix…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by michfuchs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant