我想了解如何創建一個joomla模板。我成功覆蓋了我的模板上的一些模塊和組件,但是我無法重寫錯誤消息,特別是在表單驗證上。Joomla錯誤消息文件目錄
我想知道文件位於何處,是否可以重寫?我的目的是添加一些靴子類,並在其上添加更多標籤。
我想了解如何創建一個joomla模板。我成功覆蓋了我的模板上的一些模塊和組件,但是我無法重寫錯誤消息,特別是在表單驗證上。Joomla錯誤消息文件目錄
我想知道文件位於何處,是否可以重寫?我的目的是添加一些靴子類,並在其上添加更多標籤。
您可以在/template/(your_template)/css/template.css
固定模板CSS也可以使新的CSS與/template/(your_template)/css/my.css
,包括它在/template/(your_template)/index.php
:
$doc->addStyleSheetVersion($this->baseurl . '/templates/' . $this->template . '/css/my.css');
如果你從你的CSS需要臨時替代CSS類,你可以使用「 !重要的「關於CSS文件中被忽略的屬性。
實際生成的系統消息是/layouts/joomla/system/message.php什麼錯誤消息和什麼交易後
<div id="system-message-container">
<?php if (is_array($msgList) && !empty($msgList)) : ?>
<div id="system-message">
<?php foreach ($msgList as $type => $msgs) : ?>
<div class="alert alert-<?php echo $type; ?>">
<?php // This requires JS so we should add it trough 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; ?>
</div>
感謝您的支持。我檢查了代碼,並發現了另一個謎團。按摩來自何處$ msgList = $ displayData ['msgList']。這是如何產生的? – rodge
嘗試/libraries/joomla/document/renderer/html/message.php – YellowWebMonkey
?你可以在/ templates /(name_of_template)搜索模板 – Alex
我只想替換錯誤信息的css類,問題是我不知道在哪裏尋找php文件 – rodge