In Dynamicweb CMS when you click to a detail view of a news item you will by default get a parameter “M=News” or “M=NewsV2” depending on the News Module version. That parameter will make your details view render incorrect. You can fix it in your template, but if you use the RSS feed of news items, you cannot do that.
The javascript below will fix that problem by redirecting the page to an URL without those two parameters. It is a simple javascript, just insert it into the HEAD section.
<script type="text/javascript">
// Dynamicweb CMS fix: Make sure that details view of news item is rendered correct
// Insert in Master page in HEAD section
// Will redirect to same URL but with any "M=News/M=NewsV2" removed
// 2010-06-29: Sten Hougaard, Bleau A/S
var loc = document.location+'';
var newLoc = loc.replace('&M=NewsV2', '').replace('&M=News', '');
if (loc!=newLoc) {
document.location = newLoc;
}
</script>
Category: Code, dynamicweb