I defined 3 different page styles with titleps. I also used titlesec to define a new sectioning level namely \subpart.
Now I can't use this new level's title with titleps as header in odd pages. I don't know how to introduce it to titleps. I include the code I used, it delivers what I intend(apart from the above mentioned problem), but I'd really appreciate if you could refine it.
I marked the problem in the comment to the main page-style definition.
Note: Upon @cfr's remark I removed vide page-style definition.
\documentclass[b5paper,twoside]{book}
\usepackage{geometry}
\usepackage{titletoc}
\usepackage[rm,small,center,compact,newparttoc,clearempty]{titlesec}
\titleclass{\subpart}{page}[\part]
%
%\titleformat{\chapter}{\thechapter .,. \chaptertitlename}
\newcounter{subpart}
\renewcommand{\thesubpart}{\Alph{subpart}}
\newcommand{\subpartname}{Subpart}
%
\titleformat{\subpart}[display]{\centering\normalfont\Large\bfseries}%
{\subpartname~\thesubpart}{1pc}{\Huge\bfseries}
%
\titlespacing{\subpart}{0pt}{0pt}{0pt}
\titlecontents{subpart}[0pt]{\addvspace{1pc}\normalfont\bfseries}%
{\thecontentslabel\enspace ---\enspace\large}%
{\normalfont\large\bfseries}{\hspace{2em plus 1fill}\large\contentspage}
\setcounter{secnumdepth}{-2}
\usepackage{titleps}
\newpagestyle{main}{
\sethead[][\chaptertitle][] % even
{}{\subparttitle}{} % Problem: Here I want to have subpart title.
\setfoot[][\thepage][]
{}{\thepage}{}}
\pagestyle{main}
\newpagestyle{preface}{
\sethead[][\chaptertitle][] % even
{}{\chaptertitle}{} % odd
\setfoot[][\thepage][]
{}{\thepage}{}}
\pagestyle{preface}
\assignpagestyle{\part}{empty}%it is a titlesec pkg command which suppresses page number only on the first page of the relevant sectioning command
\assignpagestyle{\subpart}{empty}
\assignpagestyle{\chapter}{empty}
\begin{document}
\frontmatter
\pagestyle{empty}
.
.
.
\chapter[Preface]{PREFACE}
\pagestyle{preface}
.
.
.
\mainmatter
\part{History}
\subpart{Primitive Historians}
\pagestyle{main}
\chapter{The Formation of the Concept of History}
\end{document}

videseems to be equivalent toempty, so a bit pointless, as far as I can see.mainuses chapter, part and page information.prefaceuses chapter and page information. None of them try to use sub-part information. – cfr Jun 04 '16 at 22:31titlepsseparately but as an option fortitlesec, if you want them to work nicely together. – cfr Jun 04 '16 at 23:52