daily pastebin goal
32%
SHARE
TWEET

Untitled

a guest Jun 14th, 2018 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <cfsetting enablecfoutputonly="true" />
  2. <!--- @@displayname: Google News Sitemap --->
  3. <!--- @@description: Generates a Google News Sitemap from dmNews content items. --->
  4. <!--- @@cacheStatus: 1 --->
  5. <!--- @@cacheTimeout: 60 --->
  6. <!--- @@fuAlias: sitemap --->
  7.  
  8. <!---
  9.  // build sitemap xml
  10. --------------------------------------------------------------------------------------------------->
  11. <cfset oSiteMap=createObject('component', 'farcry.core.packages.googleSiteMap.sitemap').init()>
  12. <cfset stSiteConfig=structNew()>
  13. <cfset stSiteConfig.domainName="#cgi.server_name#">
  14. <cfset stSiteConfig.newspublication="#application.fapi.getConfig('general','sitetitle', '#application.applicationname#')#">
  15.  
  16. <cfset xml=oSiteMap.generate(stSiteConfig=stSiteConfig,siteMapType="newsSiteMap",newsTypes="dmNews:publishDate")>
  17.  
  18. <!---
  19.  // view
  20. --------------------------------------------------------------------------------------------------->
  21. <CFHEADER NAME="content-disposition" VALUE="inline; filename=dmnews.#now()#">
  22. <cfheader name="Content-Type" value="text/xml">
  23. <cfoutput>#xml#</cfoutput>
  24.  
  25. <cfsetting enablecfoutputonly="false" />
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top