Henning Hraban Ramm
24. Januar 2018 um 08:51

Thank you, now I have:

\define[1]\ChapterTocEntry{%
\doifnotempty{\structurelistuservariable{author}}{\structureuservariable{author}\crlf }%
#1%
\doifnotempty{\structurelistuservariable{subtitle}}{\crlf\structureuservariable{subtitle}}}

But author/subtitle still don’t show up in the ToC.
Use the \doiftext check or replace \structurelistuservariable (which is never empty because
it is tagged) with \rawstructurelistuservariable (which isn’t tagged and contains only the content
of the variable).


\define[3]\SectionListCommand
  {\doiftextelse{\structurelistuservariable{test}}{YES}{NO}%
   \endgraf}

% \define[3]\SectionListCommand
%   {\doifsomethingelse{\rawstructurelistuservariable{test}}{YES}{NO}%
%    \endgraf}

\setuplist[section][alternative=command,command=\SectionListCommand]

\starttext

\placelist[section]

\startsection[title=X][test=A] \stopsection

\startsection[title=Y] \stopsection

\startsection[title=Z][test=B] \stopsection

\stoptext


Wolfgang