# Adding a second title using moderncv

I am almost done with my CV that I made using moderncv but there is a little extra that I need and it requires some advance tweaking that I am no able to perform although I think they should be possible.

I am using the casual style and I really need to be able to add a second title (title2) to the header as in this example (that I patched on Photoshop!)

Is there a way I can define a \title2{title2text} And renew \maketitle to include title2 to the right and title to the left?

Here's one way to do it:

\documentclass{moderncv}
\moderncvstyle{casual}

\makeatletter
\newcommand*{\titleii}[1]{\def\@titleii{#1}}
\titleii{}
% commands
\renewcommand*{\makecvhead}{% TODO: use \@initializecommand, which requires modifying its definition to handle \par
% recompute lengths (in case we are switching from letter to resume, or vice versa)
\recomputecvlengths%
% optional picture (pre-rendering)
\ifthenelse{\isundefined{\@photo}}%
{}%
{%
\setlength\fboxrule{\@photoframewidth}%
\ifdim\@photoframewidth=0pt%
\setlength{\fboxsep}{0pt}\fi%
{\color{color1}\framebox{\includegraphics[width=\@photowidth]{\@photo}}}}}%
% name (pre-rendering)
\if@left\raggedright\fi%
\if@right\raggedleft\fi%
\namefont%
\if@alternate% alternate design: first- and lastname in lowercase with no space in between (distinction is made by color difference)
{\color{color2!50}\MakeLowercase\@firstname}{\color{color2}\MakeLowercase\@lastname}%
\else% default design: first- and lastname as given with a space in between
{\color{color2!50}\@firstname} {\color{color2}\@lastname}\fi}}%
% rendering
\if@left%
\if@right%
{\color{color2!50}\rule{\textwidth}{.25ex}}%
% optional detailed information
\if@details{%
\\\null%
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
\flushmakeheaddetails}\fi% need to force a \par after this to avoid weird spacing bug at the first section if no blank line is left after \makehead
% optional title
\ifthenelse{\equal{\@title}{}}{}{%
\\[1.25em]\null% \null is required as there is no box on the line after \\, so glue such as \hfill (and leaders) disappear; this is in contrast to after \par, where the next line starts with an indent box (even after \noindent)
%\if@right\hfill\fi% HERE
\if@alternate%
\titlestyle{\MakeLowercase\@titleii}\hfill\titlestyle{\MakeLowercase\@title}%
\else%
\titlestyle{\@titleii}\hfill\titlestyle{\@title}\fi%
}\\[2.5em]%
% optional quote
\ifthenelse{\isundefined{\@quote}}%
{}%
{{\null\hfill%
\begin{minipage}{\quotewidth}%
\centering%
\quotestyle{\@quote}%
\end{minipage}\hfill\null\\[2.5em]}}%
\par}% to avoid weird spacing bug at the first section if no blank line is left after \maketitle
\makeatother

\firstname{Jane}
\familyname{Doe}
\title{The First Title}
\titleii{The Second Title}
\photo{picture}

\begin{document}
\makecvtitle
\end{document}