Can't use cfdocument.currentPageNumber in an expression


#1

Hi
We know cfdocument.currentPageNumber only works in ColdFusion. Am I the only person who needs this?

Does anybody have a work around so that page totals can be printed with Lucee?

TIA

Tony


#2

It is possible to use these in Lucee but NOT as an expression…

Note: The cfdocument scope variables are reserved for page number rendering. Do not use them in ColdFusion expressions.

http://underpop.online.fr/d/dreamweaver/8/coldfusion/cfdocument.htm


Note: The cfdocument scope variables are reserved for page number rendering. Do not use them in ColdFusion expressions. For example, the following code does not work:

<cfif cfdocument.currentpagenumber gt 1> 
  <cfoutput>#cfdocument.currentpagenumber-1#</cfoutput> 
</cfif>

#3

Is this the bug? https://luceeserver.atlassian.net/browse/LDEV-1546 vote for it


#4

Yes - I’ve done the vote for it too…

When ACF brought this in in CF8 the cfdocument.currentpage etc could not be accessed beyond a simple print out which is the same as Lucee at the moment. ACF must have changed it along the way.

It’s really useful for invoicing and similar outputs where there are differing lengths of recurring lines…