"The internet is just a layer on the real world" (don't forget that!)

Ensure that news items in Dynamicweb CMS are rendered correct

In CMS when you click to a detail view of a item you will by default get a parameter “M=” or “M=NewsV2” depending on the 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 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;



My PC is slow (too) – I tried “soluto”…

For some time now the fustration of the slowness of my PC has bothered me. I even made a dual boot with Windows Vista Professionen and Ubuntu 10.4 as the two “competaters” – but leaving one OS for another is not an easy task. I have however started cleaning up the PC partition, uninstalling software, cleaning up discspace and so on.

I read about “Soluto”

This morning I read about Soluto and watch a video on lifehacker.com. So now I have downloaded and installed the Soluto application and will reboot now to see what it finds out. Shat Soluto does is watch for instance the boot sequence of your PC, and suggestion what can be changed to improve the performance of your PC.

After the first running of Soluto

When I had installed the application I asked me if I wanted to reboot – I did – here are screenshoots of what I experiensed after the program had analyzed my PC:








So I found the application very cool and can reccomend it! It makes it easy to get an overview and act upon the things making your PC slow!

Using XPath operator “//” aka “descendant-or-self” in XSLT

In my daily work as frontend developer at www.bleau.dk I do a lot of “programming” – is one of the things you need to master most. With the focus mainly set on closing tasks I have not had the time to test a – well nice to know thing with the “ . Tonight I finally found out what had been a question in my mind for at long period:

The “//” (decendant-or-self) XPath operator: Can it be used relative inside a full XPath? Will it “search” from the Document top, or start where it is placed inside the XPath selector?

An example XML:

<?xml version="1.0" encoding="utf-8"?>
  <group type="frontEnd">
    <person name="Sten" />
  <group type="backend">
    <person name="Sten" />

The two XPaths

//person[@name='Sten'] – Returns a nodeset containing 2 elements

//group[@type="frontEnd"]//person[@name='Sten'] – Returns a nodeset containing only 1 element

So as you can see the first one looked from the root (/People) and anywhere inside the document. The second one had the “//” inside a XPath, which in made the “//” operator look from the spot it was and below.


Well, I just got a litle wiser as I learned that I actually can use the “//” operator inside XPath selectors.