[eluser]Andy78[/eluser]
Before We start please take into consideration that I am a noob to CI and only a recent graduate programmer so I still get confused by object orientated concepts from time to time!
So far im set-up and running with CI2, Modular Extensions - HMVC and ion-auth as a working module.
I plan to split site up into an a user facing frontend and admin backend so I have my main frontend and backend controllers and views in the normal CI controllers and views folders not in modules. I only want my widgets and partial views as modules. Make sense?
This is working so far and I can all the ion-auth login as a widget in my side bar as follows:
Code:
<!-- Begin Right Column -->
<div id="rightcolumn">
<div id="right-inner">
<?php echo modules::run('auth/auth/login');?>
</div>
</div>
<!-- End Right Column -->
In the Modular Extensions - HMVC wiki it says
Quote:If you add the _remap() method to your controllers you can prevent unwanted access to them and redirect or flag an error as you like
I don't want people to be able to access the login widget directly so I need a remap() method but how do I flag an error using this method?
To be more specific the login method in ion-auth has form validation rules how do I flag these in the remap() method and have them display in the in widget view of the login rather than it trying to redirect me to the direct view.
I really need an example to help me understand exactly what's going on.