Forum How do I...?

Different header for first page of each chapter

ixgal
hi, I would like to add a specific content in the page header in the first page of all chapters.
I can identify each chapter with their own id.
Is it possible to add the id of the chapter somewhere in this style, to get that result? (suppose the id is "chapter1")

---------
@page chapter:first {
@top-right {content: "HEADER OF THIS CHAPTER" !important;}
}
--------

Thanks!
mikeday
You could use a named string, eg.
@page chapter:first {
    @top-right { content: string(header-text) }
}

#chapter1 { string-set: header-text "header for chapter 1" }
#chapter2 { string-set: header-text "header for chapter 2" }

Edited by mikeday

ixgal
fantastic, thanks