Answer the question
In order to leave comments, you need to log in
Problems with displaying system messages in joomla 3?
I deduce by means of a standard output of messages, messages on errors of registration. Out of the box, joomla uses a version of bootstrap that doesn't match my site. In the p file I mаssage.ph
wrote a crutch with switch()
, this is what happened:
<div id="system-message-container">
<?php if (is_array($msgList) && !empty($msgList)) : ?>
<div id="system-message">
<?php foreach ($msgList as $type => $msgs) : ?>
<?php switch ($type) :
case 'message':
$type = 'success';
break;
case 'error':
$type = 'warning';
break;
default:
break;
endswitch;?>
<div class="alert alert-<?php echo $type;?> alert-dismissible fade in">
<?php // This requires JS so we should add it through JS. Progressive enhancement and stuff. ?>
<a class="close" data-dismiss="alert">×</a>
<?php if (!empty($msgs)) : ?>
<h4 class="alert-heading"><?php echo JText::_($type); ?></h4>
<div>
<?php foreach ($msgs as $msg) : ?>
<div class="alert-message"><?php echo $msg; ?></div>
<?php endforeach; ?>
</div>
<?php endif; ?>
</div>
<?php endforeach; ?>
</div>
<?php endif; ?>
$type = success
displays success, but for $type = error
Warning. I thought that the problem was with the translation, I searched, I did not find it. Translation using JText (), but in which file it looks for values, I can’t understand.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question