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