Cfdocument.currentpagenumber in header case

in ACF, I can manupulate the header in cfdocument like this:

<cfdocument  >
	<cfdocumentitem type="header" evalatprint="true">
		The Header #cfdocument.currentpagenumber#-#cfdocument.totalpagecount#
		<cfif cfdocument.currentpagenumber eq "1">
			page 1
		<cfelseif cfdocument.currentpagenumber eq "2">
			page 2
			page elase
	<cfdocumentitem type="footer" evalatprint="true">
		The Footer(#cfdocument.currentpagenumber#-#cfdocument.totalpagecount#)
	This is the body

but in the lucee the, when the page is 1, the header never goes to this condition <cfif cfdocument.currentpagenumber eq "1">

currently I use lucee version, anybody know how to do this in lucee.



I’m not sure clearly about your post. Did you face any issue using cfdocument or anything ACF can done, but lucee didn’t ?. If yes means please add the details.

yes, in lucee we cannot handle this. in ACF, at page 2, the header will show text ‘page 2’ and at page 3, the header will have text ‘page else’

in lucee, the heade all are ‘page elase’

I’ve tested this & Confirmed that issue happened on Lucee. If cfdocumentitem with type ‘header’ or ‘footer’ means it doesn’t goes to <cfif cfdocument.currentpagenumber eq “1”> this condition, even those value is equal to “1” & All headers have return same ‘page else’. In ACF is working as expected. So please arise a ticket for this issue on Jira (

In ACF :

In Lucee :

Ticket for this issue from Jira [LDEV-1546] - Lucee

1 Like