templatetags: save level inside a data attr

Make it easier to get the node level from javascript.