Guest User

Untitled

a guest
Jun 14th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  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" />
Add Comment
Please, Sign In to add comment