Different background for section page in Beamer

I'll add my answer too, the approach is the same of Bordaigorl but with less code involved.

The idea is to create another \setbeamertemplate{background} and embed it into a custom command to be used instead of \frame{\sectionpage}

The custom command will redefine the background and then the section page template. Just as an example I used a tikzpicture to reposition the section head.

This is the custom command:

\newcommand{\mysectionpage}{
    \begingroup
    \setbeamertemplate{background}{
        \begin{tikzpicture}                                         %edit this tikzpicture to customize the size and colors of the background rectangles
            \useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
            \fill[color=MedianOrange] (0,7) rectangle(0.8,8);     
            \fill[color=MedianLightBlue] (0.9,7) rectangle(\the\paperwidth, 8);
        \end{tikzpicture}
    }
    \setbeamercolor{section page}{fg=white}
    \setbeamertemplate{section page}{
    \begin{tikzpicture}                                             %edit this tikzpicture to customize the appearance of the section heading
        \node[overlay] at (1,2) {\insertsectionhead};
    \end{tikzpicture}
    }
    \frame{\sectionpage}
    \endgroup
}

The rest of your preamble code stays untouched. The body of the document will look like this:

\begin{document}
\frame{\maketitle}
\section{Introduction}
\mysectionpage                                 %new code
\begin{frame}{My presentation is about\ldots}
\begin{itemize}
\item Some stuff
\item And some other stuff
\end{itemize}
\end{frame}
\end{document}

The result is:

enter image description here


Another option following the same pattern as the MWE which uses conditionals to define the background once and forall. I do not like this approach as it is not very modular but since @dcmst asked here's a solution with conditionals.

First let's introduce a new conditional for section pages and set it to false

\newif\ifinsectionframe
\insectionframefalse

Now we can change the background template as follows

\setbeamertemplate{background}{
  \begin{tikzpicture}
  \useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
  \ifnum\thepage>1\relax% Not the title page
    \ifinsectionframe%
        \node {Some background}; %% INSERT YOUR GRAPHICS HERE
    \else%
        \fill[color=MedianOrange] (0,8) rectangle(0.8,8.3);
        \fill[color=MedianLightBlue] (0.9,8) rectangle(\the\paperwidth, 8.3);
    \fi%
  \else% Title page
      \fill[color=MedianBrown] (0,1.5) rectangle (\the\paperwidth,\the\paperheight);
      \fill[color=MedianOrange] (0,0.1) rectangle(3.45,1.4);
      \fill[color=MedianLightBlue] (3.55,0.1) rectangle(\the\paperwidth,1.4); 
  \fi
  \end{tikzpicture}
}

Then we can create a \sectionframe macro that sets the corresponding flag before creating a frame with the section page:

\newcommand{\sectionframe}{
  \insectionframetrue
  \frame{\sectionpage}
  \insectionframefalse
}

Then if you use \sectionframe instead of \frame{\sectionpage} you have the desired effect.

A note on the conditional to detect the title page: I would recommend creating a new if \ifintitleframe instead of checking the page number; apart from being more semantically sound it is also more flexible because you can now have title frames on an arbitrary page (even more than one) instead than forcing it to be on the first page.


The problem is that the section page template gets "called" within a frame but the background template can only be changed before starting the frame. Also, setting flags patching \sectionpage probably wont work because it would set them after the background is typeset.

So, the simplest solution is to define a macro to create the section frame (instead of page) so you can inject the background-changing code before starting the frame.

First let's introduce few macros to change the background:

\newcommand{\setslidebg}{
    \setbeamertemplate{background}{
      \begin{tikzpicture}
      \useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
        \fill[color=MedianOrange] (0,8) rectangle(0.8,8.3);
        \fill[color=MedianLightBlue] (0.9,8) rectangle(\the\paperwidth, 8.3);
      \end{tikzpicture}
    }
}
\newcommand{\setsecbg}{
\setbeamertemplate{background}{
  \begin{tikzpicture}
  \useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
      \node {Something else};
  \end{tikzpicture}
}    
}
\newcommand{\settitlebg}{
     \setbeamertemplate{background}{
      \begin{tikzpicture}
      \useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
          \fill[color=MedianBrown] (0,1.5) rectangle (\the\paperwidth,\the\paperheight);
          \fill[color=MedianOrange] (0,0.1) rectangle(3.45,1.4);
          \fill[color=MedianLightBlue] (3.55,0.1) rectangle(\the\paperwidth,1.4); 
      \end{tikzpicture}
    }   
}

\setslidebg

where you can replace the tikzcode in \setsecbg to produce the desired graphics.

Then you can simply create the macros \titleframe and \sectionframe as follows:

\newcommand{\titleframe}{
  \settitlebg
  \frame{\maketitle}
  \setslidebg
}

\newcommand{\sectionframe}{
  \setsecbg
  \frame{\sectionpage}
  \setslidebg
}

so now you can just write \titleframe instead of \frame{\maketitle} and have your backgrounds set accordingly.