Update Index.rst

Add comments about WHERE this code should go (especially for the case of the ajax registration, it is not obvious), an explanation of what's being passed as paramter into addContent (and what that means), and an example of how that content could then be accessed. Changes give a little more context to the example.
I'm not sure this line is necessary, but I'm fine with it.