I'll probably pull these out into macros so we can reuse the code to generate links.