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
		<cfelse>
			page elase
		</cfif>
	</cfdocumentitem>
	<cfdocumentitem type="footer" evalatprint="true">
		The Footer(#cfdocument.currentpagenumber#-#cfdocument.totalpagecount#)
	</cfdocumentitem>
	This is the body
</cfdocument>

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 5.2.3.35, anybody know how to do this in lucee.

Thanks

Andri

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 (https://luceeserver.atlassian.net).

In ACF :
acf

In Lucee :
4x

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

1 Like