Trados Studio
Trados Enterprise
Trados Team
Trados GroupShare
Trados Business Manager
Passolo
MultiTerm
RWS AppStore
Connectors
Beta Groups
Managed Translation
MultiTrans
TMS
WorldServer
Language Weaver
Language Weaver Connectors
Language Weaver Edge
Tridion Docs
Tridion Sites
LiveContent S1000D
XPP
Language Developers
Tridion Docs Developers
Community Help
RWS User Experience
Internal Trados Ideas Community
Mercury
RWS Community Internal Group
RWS Training & Certification
Style Guides
RWS Campus
RWS Enterprise Technology Partners
Trados Approved Trainers
ETUG (European Trados User Group) Public Information
Nordic Tridion Docs User Group
Tridion West Coast User Group
Trados Studio Ideas
Trados GroupShare Ideas
Trados Team Ideas
Trados Team Terminology Ideas
Trados Enterprise Ideas
Trados Business Manager Ideas
MultiTerm Ideas
Passolo Ideas
RWS Appstore Ideas
Tridion Docs Ideas
Tridion Sites Ideas
Language Weaver Ideas
Language Weaver Edge Ideas
Managed Translation - Enterprise Ideas
TMS Ideas
WorldServer Ideas
LiveContent S1000D Ideas
Contenta S1000D
XPP Ideas
Events & Webinars
To RWS Support
Detecting language please wait for.......
As discussed in Last Blog about Generating the Sitemap XML for one of the customer and it's environment is with DXA 1.7 with Web8.5, Hence Forth the Earlier Sitemap Generation using TBB didn't work and after figuring out in Many ways , deep dive into default DXA Code and figured out that by Default DXA provides the Navigation (in Json Format) and Sitemap Generation as well... So i have used the same to implement / generate the SiteMap Xml file from that base Code - it's very simple to use and below are the Steps:1) Create a Page Template "Navigate XML" and Output will be XML and add the SiteMapXml View in the "Page View Name" SectionBelow you can see the Image:by Default in DXA , from the PageModel , we get the SitemapItem from the below context
SiteConfiguration.NavigationProvider.GetNavigationModel(WebRequestContext.Localization)
after getting the sitemapItem convert to the same into your Project Specific Model and pass the same to the @SitemapForPagesInFolder(XXXSitemapmodels) so that this is a default method Provided by DXA where you can get all the items, then you can play with this data and rendering the same in xml file.Here is the Pic describes in More Clarity:
Here we have used "X-Forwarded-Proto" since one the code is Production Server where Internally LoadBalancer sometimes redirect to Http instead of Https which we can't control, so in order to fix the same we are checking "Scheme" in the Request.Headers.
Finally just create the Page with the above "Navigation XML" PT and no need to pass any Component and just publish the same.
Imp Note: since the we are getting the info from "NavigationProvider.GetNavigationModel" it is Mandatory to Publish the Navgation.json file so that it index all the page currently published. so that we will get all the required pages for Sitemap as well...
Hope this simple logic will be useful for many more customers... Waiting for any suggestion and Feedback as well...
Thank you,
Shalivahan K