codeflood logo

Line numbers in developer centre

Recently I was in a Sitecore training session where a student was commenting on the line numbers given in XSLT errors from .NET. As with most XSLT parsers, when the .NET XSLT parser encounters a syntax error in the XSLT file it gives a friendly error message including the line number the error occurred on. This particular student mentioned it would be good if the XSLT editor in Sitecore contained line numbers to help find the syntax error quickly. So I got to hacking my Sitecore straight away :) . And I’ve come up with another Sitecore tweak to add line numbers to the editors in the developer centre. You can download the tweak from my website at http://www.codeflood.net/files/Editor Line Numbers-1.0.zip . The line numbers only go up to 100 and then repeat. This was to keep the size of the package down. 100 is a good number to go up to as it’s easy to remember in your head how many times it’s repeated and what line number you’re really up to.

Comments

Hey Alistair,
As always, you’re suprising me!
I really think it’s something worth to go on with. Why not add it to the shared source library and become the admin for this small, but extremely useful extension?
Anyways, - this is so cool, and yet based on such a simple idea (an image, - why haven’t i thought of that). Absolutely a productivity feature.

Alistair Deneys

Thanks Lars, I’m not sure if it would be worth making this a shared source project. It’s so small! I suppose there are things I’d like to improve; like working out how to generate the numbers on the fly (still as an image) so it didn’t just repeat at 100.

Comments are closed