[Tex/LaTex] Changing the Hannover theme to fold subsections

beamersectioning

I'm creating big presentation in beamer and I'm using Hannover theme to show sections, subsections and subsubsections.

The presentation is big so the size of the list in the navigation bar exceeds the height of the page.

Is there any way to don't show subsections and subsubsection that are in other sections than current section?

EDIT:

I want to get rid of the Yellow part of the image

enter image description here

EDIT 2:
Assuming the structure of the presentation is:

-SECTION 1
--SUBSECTION 11
---SUBSUBSECTION 111
---SUBSUBSECTION 112
--SUBSECTION 12
---SUBSUBSECTION 121
---SUBSUBSECTION 122
--SUBSECTION 13
-SECTION 2
--SUBSECTION 21
---SUBSUBSECTION 211
-SECTION 3

Also assuming that I'm on the page named SUBSUBSECTION 111, the navigation bar should show:

-SECTION 1
--SUBSECTION 11
---SUBSUBSECTION 111   <-- here I am
---SUBSUBSECTION 112
--SUBSECTION 12
--SUBSECTION 13
-SECTION 2
-SECTION 3

Best Answer

Update

After the edit to the question, no predefined option is given to obtain the desired result, but you can use

\makeatletter
\beamer@nav@subsectionstyle{show/hide/hide}
\makeatother

A complete example:

\documentclass{beamer}
\usetheme{Hannover}

\makeatletter
\beamer@nav@subsectionstyle{show/hide/hide}
\makeatother


\begin{document}

\section{Test section one}
\begin{frame} test frame in section~\thesection\end{frame}
\subsection{Test subsection one one}
\begin{frame} test frame in section~\thesection\end{frame}
\subsubsection{Test subsubsection one one one}
\begin{frame} test frame in section~\thesection\end{frame}
\subsection{Test subsection one two}
\begin{frame} test frame in section~\thesection\end{frame}
\subsubsection{Test subsubsection one two one}
\begin{frame} test frame in section~\thesection\end{frame}

\section{Test section two}
\begin{frame} test frame in section~\thesection\end{frame}
\subsection{Test subsection two one}
\begin{frame} test frame in section~\thesection\end{frame}
\subsubsection{Test subsubsection two one one}
\begin{frame} test frame in section~\thesection\end{frame}
\subsection{Test subsection two two}
\begin{frame} test frame in section~\thesection\end{frame}
\subsubsection{Test subsubsection two two one}
\begin{frame} test frame in section~\thesection\end{frame}

\end{document}

First version

Simply use the hideothersubsections for the theme:

\documentclass{beamer}
\usetheme[hideothersubsections]{Hannover}

\begin{document}

\section{A first test section}
\begin{frame} test frame in section~\thesection\end{frame}
\subsection{A test subsection}
\begin{frame} test frame in section~\thesection\end{frame}
\subsubsection{A test subsubsection}
\begin{frame} test frame in section~\thesection\end{frame}
\subsection{A test subsection}
\begin{frame} test frame in section~\thesection\end{frame}
\subsubsection{A test subsubsection}
\begin{frame} test frame in section~\thesection\end{frame}

\section{A second test section}
\begin{frame} test frame in section~\thesection\end{frame}
\subsection{A test subsection}
\begin{frame} test frame in section~\thesection\end{frame}
\subsubsection{A test subsubsection}
\begin{frame} test frame in section~\thesection\end{frame}
\subsection{A test subsection}
\begin{frame} test frame in section~\thesection\end{frame}
\subsubsection{A test subsubsection}
\begin{frame} test frame in section~\thesection\end{frame}

\end{document}

An image of the sidebar for a frame on the first section:

enter image description here

An image of the sidebar for a frame on the second section:

enter image description here