The majority of Magento websites out there list their top level categories as well as the current categories sub-categories. This feature is commonly requested on forums so I decided to write a small post about it.
Rather than just write out the code, I will show you a few variations so that you can get the right one for you.
All of the following code samples can be copy and pasted into ANY template file and will function correctly.
Display Top Level Categories Only
) > 0): ?>
"<?php echo $_helper->getCategoryUrl($_category) ?>"