[Tex/LaTex] Different backgrounds for title and “normal” frames in beamer

backgroundsbeamertikz-pgf

I want to draw different backgrounds for the title frame and normal frames in beamer, using tikz. Doing this for the normal frames was straight forward, but that background now also shows up on the title frame (shifted to the bottom), which is not desired:

\documentclass{beamer} 
\useoutertheme[subsection=true]{miniframes}%{miniframes}
\defbeamertemplate*{background}{miniframes theme}
{%
  \begin{beamercolorbox}{background}
  \begin{tikzpicture}
    \fill[red] (current page.north west) rectangle ++(0.5cm,-0.5cm);
  \end{tikzpicture}
  \end{beamercolorbox}
}

\usepackage{tikz}
\usetikzlibrary{calc,positioning}
\usepackage{blindtext}

\title{new template} 
\author{Christoph} 

\setbeamertemplate{title page}{
  \insertauthor

  \insertdate

  \insertinstitute

  \inserttitlegraphic
}
\setbeamertemplate{navigation symbols}{}
\begin{document} 
\frame[plain]{\titlepage}
\section{a section}
\subsection{a subsection}
\begin{frame}
 \frametitle{Frame 1}
\blindtext
\end{frame}
\begin{frame}
 \frametitle{Frame 2}
\end{frame}
\subsection{another subsection}
\begin{frame}
 \frametitle{Frame 1}
\blindtext
\end{frame}
\begin{frame}
 \frametitle{Frame 2}
\end{frame}
\end{document}

(my example just uses a red rectangle for simplicity)

I have tried adding the tikzpicture to the header template, which resulted in a shifted navigation (without tikzpicture[overlay]), or the picture not showing up at all (with tikzpicture[overlay]). If this can be solved with the headline template, I'll use that.

Text added to the frame should not be covered by the background picture.

Best Answer

I used a command to store the image that will be used in the pages that are not the title page. Just before the title page I locally redefined the command to use the image for the title page:

\documentclass{beamer} 
\useoutertheme[subsection=true]{miniframes}%{miniframes}

\usepackage{tikz}
\usetikzlibrary{calc,positioning}
\usepackage{blindtext}

% The command will contain the image used in most of the frames
\newcommand\MyBgImage{%
  \begin{tikzpicture}
    \fill[red] (current page.north west) rectangle ++(0.5cm,-0.5cm);
  \end{tikzpicture}
}

\defbeamertemplate*{background}{miniframes theme}
{%
  \begin{beamercolorbox}{background}
    \MyBgImage
  \end{beamercolorbox}
}

\title{new template} 
\author{Christoph} 

\setbeamertemplate{title page}{
  \insertauthor

  \insertdate

  \insertinstitute

  \inserttitlegraphic
}
\setbeamertemplate{navigation symbols}{}

\begin{document} 

% local redefinition of the image. To be used in the titlepage
\begingroup
\renewcommand\MyBgImage{%
\vskip-1cm% adjust according to the image
\begin{tikzpicture}
    \fill[green] (current page.north west) circle[radius=0.5cm];
  \end{tikzpicture}%
}
\frame[plain]{\titlepage}
\endgroup

\section{a section}
\subsection{a subsection}
\begin{frame}
 \frametitle{Frame 1}
\blindtext
\end{frame}
\begin{frame}
 \frametitle{Frame 2}
\end{frame}
\subsection{another subsection}
\begin{frame}
 \frametitle{Frame 1}
\blindtext
\end{frame}
\begin{frame}
 \frametitle{Frame 2}
\end{frame}
\end{document}