[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Using conditionals in <cfdocumentitem type="header">

Posted on 2011-05-09
4
Medium Priority
?
724 Views
Last Modified: 2012-06-21
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
0
Comment
Question by:WebStalkers
  • 2
  • 2
4 Comments
 
LVL 52

Accepted Solution

by:
_agx_ earned 2000 total points
ID: 35723549
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
 
LVL 2

Author Comment

by:WebStalkers
ID: 35723609

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
 
LVL 52

Expert Comment

by:_agx_
ID: 35723640
Add a comment to adobe's online docs.  I'm sure it'll save somebody's sanity ;-)
0
 
LVL 2

Author Comment

by:WebStalkers
ID: 35724200
Good idea..will do!
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

PROBLEM: How to add your own buttons to the bottom toolbar with paging info ( result count ). While creating a cfgrid, I ran into an issue where I wanted to embed my own custom buttons where the default ones ( insert / delete / etc… ) are for aes…
Today, I was working on some optimization and spam-stopping techniques when I encountered Ben Nadel's post to reduce spam feature using Math (http://www.bennadel.com/blog/197-How-I-Stop-Spammers-On-My-ColdFusion-Blog.htm). While this method is not o…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses
Course of the Month19 days, 5 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question