Table of contents
Permalink<?php $blocks = Page::getCurrentPage()->getBlocks('Main'); //<--replace 'Main' with the name of the area you want foreach ($blocks as $b) { //do something... but what? } ?>
The real problem is: what do you want the table of contents to show exactly? Blocks don't have names, so how would you decide what exactly to list in the table of contents?
maybe take a look at:
http://www.concrete5.org/marketplace/addons/example-faq/...