Use dom to build category links

 * Follow up to Iae2f3bf90b13f83411432e06e2ee7e188f34bb43.

Change-Id: I701ed182893d0bc0daee99fd27bad95b19504a44