[Tex/LaTex] Beamer Style: change only ToC style

beamerconditionalstable of contents

I would like to modify a Beamer Theme so that I add some text in every slides, but not in the ToC (table of content) pages.

Consequently, I guess I would need to use a "if/then"-like condition in my theme like this (pseudo-code style):

if(we are not in a ToC page)
     addText()
 else
     do nothing

But I do not know at all how I could write that in Beamer, and could not find it on the Internet.

Do you know how I should write that?

Thanks!


In response to the comments I received, here are some precisions:
The beamer theme I want to modify is provided by my company. What I want to add is a title at the top of every slides (just underneath a top bar where we have the company logo and title).
So I edited the outer .sty file of the Beamer theme, in the frametitle section, to add a beamerbox.
It would look like this:

 \defbeamertemplate*{frametitle}{watermelon theme}
 { 
     [...]
     \begin{beamercolorbox}[wd=.95\paperwidth,ht=0.0cm,leftskip=.1\paperwidth]{section title}
     \begin{flushleft}
     {\usebeamercolor[fg]{frametitle}\usebeamerfont{framesubtitle}\insertsection\par}%
     \end{flushleft}
     \end{beamercolorbox}
     [...]
}

However, this beamerbox is shown every slides, even on ToC.
Hence I thought that if I had a way to write an "if(we are not in a ToC page)" before this beamercolorbox, it would be the simplest way to make it work.

Is it enough?


Following samcarter answer, I tested the following work-around in code (enough for me now, until I finally find some time to learn latex/beamer):
at a change of section, I write:

 \setbeamertemplate{frametitle}[default]
 \section{My title}
 \setbeamertemplate{frametitle}[My company theme]

Thanks !

Best Answer

If the section pages should use another frametitle template than the normal frames, you can add it to the definition of the section pages. To keep it localised wrapp it into an additional layer of {}.

\documentclass{beamer}

\defbeamertemplate*{frametitle}{watermelon}
{ 
     \begin{beamercolorbox}[wd=.95\paperwidth,ht=0.0cm,leftskip=.1\paperwidth]{section page}
     \begin{flushleft}
         {\color{red} \usebeamerfont{framesubtitle}\insertsection\par}%
     \end{flushleft}
     \end{beamercolorbox}
}

\AtBeginSection{%
{
    \setbeamertemplate{frametitle}[default] 
    \begin{frame}
        \frametitle{toc}
    \end{frame}
}
}

\begin{document}


\section{bla}
\begin{frame}
\frametitle{bla}
    abc
\end{frame}

\section{blub}
\begin{frame}
\frametitle{blub}
    abc
\end{frame}     

\end{document}
Related Question