Nested Dynamic list with custom code?

Hey guys,
I have 2 issues that I can’t solve currently:

  1. Create a dynamic collection that contains a dynamic collection (i.e list of categories with their items)
  2. Create in page navigation for dynamic collection (i.e click on category scroll to relevant category)

for issue no. 2 I saw a post with a code hack (although I can’t make it work for me), but for issues no.1?
is it possible do with custom code? (I know the feature doesn’t exists, I can’t wait though)