PDA

Zobacz pełną wersję : własny szablon - tytuły modułów



peters
12-05-2014, 09:13
Piszę własny szablon do Joomla 3.3. Nie wiem czemu, nie wyświetlają mi się tytuły modułów. Po przełączeniu na jakiś inny szablon, tytuły się pojawiają. Może jakieś sugestie?

pozdrawiam

marian_mk
12-05-2014, 09:33
prawdopodobie w index.php szablonu brar stylu szablonu np.


<jdoc:include type="modules" name="top" style="xhtml" />

peters
12-05-2014, 09:50
Nie pomogło.
Przed chwilą natrafiłem na taki artykuł:

http://joomla.jogger.pl/2010/02/17/wlasne-style-modulow/

może brak definicji funkcji function modChrome?

marian_mk
12-05-2014, 09:59
funkcja
function modChrome_mojstyl jet potrzebna tylko wtedy gdy tworzysz własny styl modułu . Joomla ma zdefiniowane style podstawowe takie jak: none, html5, table, horz, rounded, outline, xhtml i przy wykorzystaniu jednego z tych dostepnych styli nalezy go okreslic w kodzie wywołujacym moduł
<jdoc:include type="modules" name="top" style="xhtml" />

Brak nagłowka moze wynikac tez z ostylowania np. zastosowania h3{display:none;} , W stylu html5 , mozesz definiowac znacznik modułu w konfiguracji modułu

peters
12-05-2014, 10:13
dopisałem

h3{
display: inline;
}

nie pomogło

wgrałem plik modules.php z szablonu protostar

<?php/** * @package Joomla.Site * @subpackage Templates.protostar * * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */
defined('_JEXEC') or die;
/** * This is a file to add template specific chrome to module rendering. To use it you would * set the style attribute for the given module(s) include in your template to use the style * for each given modChrome function. * * eg. To render a module mod_test in the submenu style, you would use the following include: * <jdoc:include type="module" name="test" style="submenu" /> * * This gives template designers ultimate control over how modules are rendered. * * NOTICE: All chrome wrapping methods should be named: modChrome_{STYLE} and take the same * two arguments. */
/* * Module chrome for rendering the module in a submenu */function modChrome_no($module, &$params, &$attribs){ if ($module->content) { echo $module->content; }}
function modChrome_well($module, &$params, &$attribs){ if ($module->content) { echo "<div class=\"well " . htmlspecialchars($params->get('moduleclass_sfx')) . "\">"; if ($module->showtitle) { echo "<h3 class=\"page-header\">" . $module->title . "</h3>"; } echo $module->content; echo "</div>"; }}?>

<jdoc:include type="modules" name="top" style="well" />

- też nic

peters
12-05-2014, 11:24
Już działa, pojęcia nie mam co było nie tak, chyba jakiś błąd składni lub literówka - zmęczenie :)
Polecam jeszcze raz: http://joomla.jogger.pl/2010/02/17/w...style-modulow/ (http://joomla.jogger.pl/2010/02/17/wlasne-style-modulow/) - może się przydać, gdy trzeba zrobić coś niestandardowego :)