Forked from stevewithington/muraDynamicLayoutTemplate.cfc
Created
February 17, 2014 05:35
-
-
Save ronnieduke/9045272 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
component extends='mura.cfobject' { | |
// drop this in your site or theme eventHandler.cfc | |
public any function onRenderStart($) { | |
// allow for a 'View As PDF' link (e.g., <a href="./?viewAsPDF=1">View As PDF</a>) | |
if ( IsBoolean(arguments.$.event('viewAsPDF')) && arguments.$.event('viewAsPDF') ) { | |
arguments.$.content('template', 'pdf.cfm'); | |
} | |
// open calendar events in a blank template | |
if ( Right($.content('parentid'),3) != 'END' && $.content().getParent().getType() == 'Calendar' && $.content('type') == 'Page' ) { | |
$.content('template','blank.cfm'); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfdocument format="pdf"> | |
<cfoutput> | |
<h3>#HTMLEditFormat($.content('title'))#</h3> | |
#$.dspBody(body=$.content('body'),pageTitle='',crumbList=0,showMetaImage=0)# | |
</cfoutput> | |
</cfdocument> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment