[Tex/LaTex] Section* displayed in minitoc and not in “normal”toc

minitoctable of contents

I have managed to create a minitoc at the start of a chapter and added section* to the minitoc. However I wanted a solution that those section with a star are only visible in the minitoc and not the normal table of contents. How can I realize this?

\documentclass[a4paper,10pt]{report}
\usepackage{minitoc}
\begin{document}
\dominitoc
\tableofcontents %In this table of contents only the sections without a star section{} and not section*{}

\chapter{Title chapter 1}
\section{Title of subsection one}
content... 

\section{Title of subsection two}
content.... 

\chapter{Title chapter 2} 
\minitoc %In this table of contents all sections also section*{}. 

\section{Title of subsection one}
\addcontentsline{toc}{section}{Title of subsection one}
content...

\section{Title of subsection two}
content...
\end{document}

Best Answer

Here's one possible solution using the titletoc package; the idea is to use \addcontentsline with extension ptc (the default extension used by titletoc for the partial ToCs) to include information in the partial ToC only:

\documentclass{book}
\usepackage{titletoc}

\begin{document}

\tableofcontents

\startcontents
\chapter{Test Chapter}
\printcontents{}{1}{}

\section{Test Numbered Section}
\section*{Test Unnumbered Section}
\addcontentsline{ptc}{section}{Test Unnumbered Section}
\section{Another Test Numbered Section}
\section*{Another Test Unnumbered Section}
\addcontentsline{ptc}{section}{Another Test Unnumbered Section}

\end{document}

An image of the general ToC:

enter image description here

An image of the partial ToC at the beginning of the chapter:

enter image description here