# Beamer - Modify frame environment with frame title

To include some heading (just above the content) in a beamer frame, I am using this code:

\makeatletter
\let\oldframe\frame
\def\frame{\@ifnextchar[\frame@i \frame@ii}
\makeatother


It works well along with all options, but the frame title appears at an odd location (along with the content, instead of the normal top position). Does anybody know how to fix it?

A minimal working example:

\documentclass{beamer}
\makeatletter
\let\oldframe\frame
\def\frame{\@ifnextchar[\frame@i \frame@ii}
\makeatother

\begin{document}
\begin{frame}{Title}
The title does not appear as expected
\end{frame}
\end{document}


I don't recommend the redefinition of the frame environment. This can cause problems, especially with fragile content.

If you really must do it:

\documentclass{beamer}

\newenvironment{myframe}[1]
{\begin{frame}[environment=myframe]
\frametitle{#1}