# Beamer template with different style options for frames

I am working on a beamer template which tries to mimick an existing .ppt-template from my institute. My problem now is, that the beamer template should be able to have frames with different styles for the headline within a single presentation. (do not ask why this would be necessary, I do not know)

After having a look into beamerbaseframe.sty and playing a bit with frame options, I came up with the following code

\documentclass{beamer}

\usetheme{mytheme}

\begin{document}

\begin{frame}
left
\end{frame}

\begin{frame}[rightslide]
right
\end{frame}

\begin{frame}
should be left again :(
\end{frame}

\end{document}


using beamerthememytheme.sty

\setbeamertemplate{headline}{%
\rule{.5\paperwidth}{14mm}
}

\define@key{beamerframe}{rightslide}[true]{%
}


So the question is now: how can I revert to the default headline after the slide with the option rightslide?

You can define two different templates and reset the headline to the default style before a new frame starts.

\documentclass{beamer}
\usepackage{etoolbox}

\rule{.5\paperwidth}{14mm}%
}
\emph{\hfill\rule{.5\paperwidth}{14mm}}%
}

\BeforeBeginEnvironment{frame}{%
}

\makeatletter
\define@key{beamerframe}{rightslide}[true]{%
}
\makeatother

\begin{document}

\begin{frame}
left
\end{frame}

\begin{frame}[rightslide]
right
\end{frame}

\begin{frame}
is left again
\end{frame}

\end{document}