mikuniek
07-01-2010, 10:15
Witajcie! Mam pytanie, chciałbym stworzyć nowy 'styl' wyświetlania modułu przy użyciu modules.php, napisałem funkcję ale najwyraźniej jest coś nie tak, gdyż po wstawieniu modules.php o tej treści do /html/ powoduje wyświetlanie pustej strony w portalu. Oto funkcja:
<?php
function modChrome_cpb( $module, &$params, &$attribs ) {
if (isset( $attribs['cpb_name'] ))
{
$cpb_name = $attribs['cpb_name'];
} else {
$cpb_name = cpbmodule;
}
echo <div class="' .$cpb_name .'">
if ($module->showtitle)
{
echo <div class=”cpb_heading”>
echo ' .$module->title .'
echo </div>
}
echo <div class=”cpb_content”>
echo $module->content;
echo </div>
echo </div>
}
?>
i kolejne pytanie, czy taki styl można też przypisać do wyświetlania komponentu (treść, artykuł itp.)?
<?php
function modChrome_cpb( $module, &$params, &$attribs ) {
if (isset( $attribs['cpb_name'] ))
{
$cpb_name = $attribs['cpb_name'];
} else {
$cpb_name = cpbmodule;
}
echo <div class="' .$cpb_name .'">
if ($module->showtitle)
{
echo <div class=”cpb_heading”>
echo ' .$module->title .'
echo </div>
}
echo <div class=”cpb_content”>
echo $module->content;
echo </div>
echo </div>
}
?>
i kolejne pytanie, czy taki styl można też przypisać do wyświetlania komponentu (treść, artykuł itp.)?