Using conditionals in <cfdocumentitem type="header">

I don't seem to have an issue with running a conditional in the 'Footer':

<cfdocumentitem type="footer">
<cfoutput>
<cfif cfdocument.currentpagenumber neq 1>
	page #cfdocument.currentpagenumber# of #cfdocument.totalpagecount#
</cfif>
</cfoutput>
</cfdocumentitem>

Open in new window


But if I run a conditional like this in <cfdocumentitem type="header"> it is totally ignored.  I have seen that this is an issue/bug in some of the articles I have read but wondered if anyone has come up with a solution for this.  It really shouldnt be this difficult.

Using: ColdFusion 9.0.1, Windows 2008R2, IIS 7

Thanks in advance
LVL 2
WebStalkersAsked:
Who is Participating?
 
_agx_Connect With a Mentor Commented:
You're missing an attribute
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/Cold_Fusion_Markup_Language/Q_26663118.html?sfQueryTermInfo=1+10+30+evalatprint

<cfdocument format="pdf">
      <cfdocumentitem type="header" evalAtPrint="true">
      <cfif cfdocument.currentpagenumber neq 1>
            <cfoutput>page #cfdocument.currentpagenumber# of #cfdocument.totalpagecount#</cfoutput>
      </cfif>
      </cfdocumentitem>
      <h1>FirstPage</h1>
      <cfdocumentitem type="pagebreak"/>
      <h1>SecondPage</h1>
</cfdocument>      
0
 
WebStalkersAuthor Commented:

I didn't see that anywhere in the articles I have been looking at. That seems to have solved it.
Thank you so much!  This has been driving me nuts.
0
 
_agx_Commented:
Add a comment to adobe's online docs.  I'm sure it'll save somebody's sanity ;-)
0
 
WebStalkersAuthor Commented:
Good idea..will do!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.