Hi there,
It seems as though Joomla's #system-message-container is missing from your WorldBiz template. (System Messages are turned on in the template settings.)
I am trying to use Joomla's renderMessages JS function, but that looks for the system-message-container.
See the code below from /media/system/core-uncompressed.js line 321:
Joomla.renderMessages = function( messages ) {
Joomla.removeMessages();
var messageContainer = document.getElementById( 'system-message-container' ),
type, typeMessages, messagesBox, title, titleWrapper, i, messageWrapper, alertClass;
for ( type in messages ) {
if ( !messages.hasOwnProperty( type ) ) { continue; }
// Array of messages of this type
typeMessages = messages[ type ];
// Create the alert box
messagesBox = document.createElement( 'div' );
// Message class
alertClass = (type === 'notice') ? 'alert-info' : 'alert-' + type;
alertClass = (type === 'message') ? 'alert-success' : alertClass;
alertClass = (type === 'error') ? 'alert-error alert-danger' : alertClass;
messagesBox.className = 'alert ' + alertClass;
// Close button
var buttonWrapper = document.createElement( 'button' );
buttonWrapper.setAttribute('type', 'button');
buttonWrapper.setAttribute('data-dismiss', 'alert');
buttonWrapper.className = 'close';
buttonWrapper.innerHTML = '×';
messagesBox.appendChild( buttonWrapper );
// Title
title = Joomla.JText._( type );
// Skip titles with untranslated strings
if ( typeof title != 'undefined' ) {
titleWrapper = document.createElement( 'h4' );
titleWrapper.className = 'alert-heading';
titleWrapper.innerHTML = Joomla.JText._( type );
messagesBox.appendChild( titleWrapper );
}
// Add messages to the message box
for ( i = typeMessages.length - 1; i >= 0; i-- ) {
messageWrapper = document.createElement( 'div' );
messageWrapper.innerHTML = typeMessages[ i ];
messagesBox.appendChild( messageWrapper );
}
messageContainer.appendChild( messagesBox );
}
};
From what I understand this should be part of the template by including <jdoc:include type="message" /> in the template index file. That is how it is included in protostar, but I am not sure how you do it with gantry?
Thank you!
Rich