Skip to content

How to exclude some top-level navigation items when using navigation.tabs #3405

Answered by squidfunk
ben519 asked this question in Q&A
Discussion options

You must be logged in to vote

Great question. I agree that it's sometimes hard to find a structure that just feels right and you need to go back and forth until settling for something that works well. So as I understand – you want to structure content with tabs, but you want to omit the links from the tab bar. A problem that comes to mind is… how does the user navigate? How does he get back to the home page or switch between courses? Nonetheless, in order to hide all tabs you could just add a few lines of extra CSS:

.md-tabs {
  display: none;
}

If you want to hide a specific tab, you could just use nth-child to select the specific course (easy solution) or extend the tabs.html template to somehow check whether to ski…

Replies: 3 comments 15 replies

Comment options

You must be logged in to vote
5 replies
@ben519
Comment options

ben519 Jan 1, 2022
Author Sponsor

@squidfunk
Comment options

@ben519
Comment options

ben519 Jan 1, 2022
Author Sponsor

@squidfunk
Comment options

@TiesWestendorp
Comment options

Answer selected by ben519
Comment options

You must be logged in to vote
3 replies
@squidfunk
Comment options

@squidfunk
Comment options

@jcyrss
Comment options

Comment options

alexvoss
Feb 22, 2024
Collaborator Sponsor

You must be logged in to vote
7 replies
@jcyrss
Comment options

@squidfunk
Comment options

@jcyrss
Comment options

@alexvoss
Comment options

alexvoss Feb 25, 2024
Collaborator Sponsor

@jcyrss
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants