Ever wanted a categorized view where the categories themselves are "clickable"? Tired of those ugly twisties? Here is how to do it.
Put this code in your category columns in the view. This will make the category "clickable".
"[" + "<script>document.write("<a href='"+document.links[document.links.length-1]+"'>" + MyCategoryFieldName + "</a>");</script>" + "]"
Want to get rid of the twisties? Extend the code to look like this.
"[" + "<script>document.write("<a href='"+document.links[document.links.length-1]+"'>" +
MyCategoryFieldName + "</a>");" +
"if(document.images[document.images.length-1].src.indexOf("expand.gif") != -1) {" +
"document.images[document.images.length-1].src="/icons/ecblank.gif";}"+
"if(document.images[document.images.length-1].src.indexOf"collapse.gif") != -1){" +
"document.images[document.images.length-1].src="/icons/ecblank.gif";}</script>" + "]"
In this example, the twisties are replaced by the ecblank gif; you could of course use any gif of choice.
This was first published in March 2001