I’m using JModuleHelper::renderModule(); to render Joomla login module in the frontend of the site. I have this code at the bottom of my source in a T3 tpl file. Everything is working fine in frontend. However when this code is in the template file the T3 Admin area under templates does not function correctly. For example if I was to click the Save button on the T3 Admin Template Edit Styles Toolbar it does not save and instead it redirects to the users managment component in the admin area. Here is the code I’m using for rendering the login module.
<?php
$app = JFactory::getApplication();
$user = JFactory::getUser();
// get user and see if they are in a particular group
// if not display modal with loginform.
if (!in_array(13, $user->groups)):
jimport( 'joomla.application.module.helper' );
$module = JModuleHelper::getModule( 'login', 'Modal Login' );
$attribs['style'] = 'xhtml';
?>
<!-- Modal -->
<div id="committeeSignUpModal" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h3>WAIT!</h3>
</div>
<div class="modal-body">
<h3>You MUST login to be eligible for Committee Sign Up!</h3>
<?php echo JModuleHelper::renderModule( $module, $attribs ); ?>
</div>
<div class="modal-footer"></div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<?php endif; ?>
If anyone can give any insight to as what may be wrong that would be great. Thanks!