| 1 | <cfoutput>print disabled.</cfoutput><cfabort /> |
|---|
| 2 | |
|---|
| 3 | <!--- |
|---|
| 4 | Name : c:\projects\blog\client\print.cfm |
|---|
| 5 | Author : Raymond Camden |
|---|
| 6 | Created : 09/23/05 |
|---|
| 7 | Last Updated : 2/28/07 |
|---|
| 8 | History : Changed request.rooturl to app.rooturl (rkc 11/11/05) |
|---|
| 9 | : use of rb (rkc 8/20/06) |
|---|
| 10 | : Don't log the get entry (rkc 2/27/07) |
|---|
| 11 | ---> |
|---|
| 12 | |
|---|
| 13 | <cfif not isDefined("url.id")> |
|---|
| 14 | <cflocation url="index.cfm" addToken="false"> |
|---|
| 15 | </cfif> |
|---|
| 16 | |
|---|
| 17 | <cftry> |
|---|
| 18 | <cfset entry = application.blog.getEntry(url.id,true)> |
|---|
| 19 | <cfcatch> |
|---|
| 20 | <cflocation url="index.cfm" addToken="false"> |
|---|
| 21 | </cfcatch> |
|---|
| 22 | </cftry> |
|---|
| 23 | |
|---|
| 24 | <cfheader name="Content-Disposition" value="inline; filename=print.pdf"> |
|---|
| 25 | <cfdocument format="pdf"> |
|---|
| 26 | |
|---|
| 27 | <cfoutput> |
|---|
| 28 | <html> |
|---|
| 29 | |
|---|
| 30 | <style type="text/css"> |
|---|
| 31 | @import url(#application.rooturl#/includes/style.css); |
|---|
| 32 | </style> |
|---|
| 33 | |
|---|
| 34 | <body style="background:##FFFFFF"> |
|---|
| 35 | <div id="page"> |
|---|
| 36 | <div id="content"> |
|---|
| 37 | <div id="blogText"> |
|---|
| 38 | </cfoutput> |
|---|
| 39 | |
|---|
| 40 | <cfdocumentitem type="header"> |
|---|
| 41 | <cfoutput> |
|---|
| 42 | <div style="font-size: 8px; text-align: right;"> |
|---|
| 43 | #application.blog.getProperty("blogTitle")#: #entry.title# |
|---|
| 44 | </div> |
|---|
| 45 | </cfoutput> |
|---|
| 46 | </cfdocumentitem> |
|---|
| 47 | |
|---|
| 48 | <cfsavecontent variable="display"> |
|---|
| 49 | <cfoutput> |
|---|
| 50 | <h1>#entry.title#</h1> |
|---|
| 51 | |
|---|
| 52 | <div class="byline">#rb("postedat")# : #application.localeUtils.dateLocaleFormat(entry.posted)# #application.localeUtils.timeLocaleFormat(entry.posted)# |
|---|
| 53 | <cfif len(entry.name)>| #rb("postedby")# : #entry.name#</cfif><br /> |
|---|
| 54 | #rb("relatedcategories")#: |
|---|
| 55 | <cfloop item="cat" collection="#entry.categories#"> |
|---|
| 56 | #entry.categories[cat]#<cfif cat is not listLast(structKeyList(entry.categories))>,</cfif> |
|---|
| 57 | </cfloop> |
|---|
| 58 | </div> |
|---|
| 59 | |
|---|
| 60 | <div class="body"> |
|---|
| 61 | #application.blog.renderEntry(entry.body,true,entry.enclosure)# |
|---|
| 62 | #application.blog.renderEntry(entry.morebody,true)# |
|---|
| 63 | </div> |
|---|
| 64 | </cfoutput> |
|---|
| 65 | </cfsavecontent> |
|---|
| 66 | |
|---|
| 67 | <!--- |
|---|
| 68 | Older blog entries use class=code, so let's do a quick fix for them |
|---|
| 69 | ---> |
|---|
| 70 | <cfset display = replace(display, "class=""code""", "class=""codePrint""", "all")> |
|---|
| 71 | <cfoutput>#display#</cfoutput> |
|---|
| 72 | |
|---|
| 73 | <cfoutput> |
|---|
| 74 | </div> |
|---|
| 75 | </div> |
|---|
| 76 | </div> |
|---|
| 77 | |
|---|
| 78 | </body> |
|---|
| 79 | </html> |
|---|
| 80 | </cfoutput> |
|---|
| 81 | |
|---|
| 82 | </cfdocument> |
|---|