Gerben Wierda schrieb am 25.10.2021 um 08:41:
I have a problem with getting the page number on the ‘first’ page of a chapter (in my setup, it is actually the second page as there is a LHS page before it with a quote. The bare minimum example:

When you switch to the chapter-environment get an additional hook at the start of each chapter. The advantage of this hook is that its values are inserted before the actual chapter code even starts.

\setuppagenumbering[alternative=doublesided]

\definetext
  [chapterfooter] % name
  [footer]        % vertical location
  [pagenumber]    % content

\setuphead
  [chapter]
  [page=yes,
   header=empty,
   footer=chapterfooter,
   sectionsegments=chapter,
   before={\blank[force,2*big]},
   after={\blank[3*big]},
   beforesection=\directsetup{chapter:before}]

\startsetups [chapter:before]
    \page[left]
    \noheaderandfooterlines
    \startalignment[flushright,nothyphenated]
    \startnarrower[4*left]
        \em \getbuffer[chapter:quote]
    \stopnarrower
    \stopalignment
    \page[right]
\stopsetups

\starttext

\startbuffer [chapter:quote]
If you think good architecture is expensive, try bad architecture\crlf
{\tf Brian Foote and Joseph Yoder}
\stopbuffer

\startchapter[title={One}]
\dorecurse{5}{\input tufte \par \input knuth}
\stopchapter

\startchapter[title={Two}]
\dorecurse{5}{\input tufte \par \input knuth}
\stopchapter

\stoptext

Wolfgang