[eluser]DougW[/eluser]
I have a main module, let's call it 'home.' It is a controller and a view. On this view I am using a jquery menu that loads sub-modules with ajax. Each sub-module is also a controller/view combination, such as 'dashboard.'
I am trying to find a way to detect whether or not the sub-module was in fact loaded by the ajax call and thereby, valid. For example, I have a sub-module called 'dashboard' but I don't want users to be able to load the dashboard with just /dashboard. it should only be valid if called from the home module.
There are probably a million ways to do this but I was wondering if there was a CI- tool or trick for detecting whether a CV construct was at the 'top' level or not besides looking at the url, as that clearly won't work in this case.
Any clever ideas are appreciated.