Joomla.it Forum

Joomla! 1.5.x (versione con supporto terminato) => Joomla! 1.5 => I Template di Joomla 1.5.x => : gnagnibu 22 Jan 2011, 16:41:20

: Come ripristinare stile Topmenu
: gnagnibu 22 Jan 2011, 16:41:20
Salve a tutti.
Spostando il topmenu dalla posizione top1 a user1, lo stesso topmenu sembra aver perso lo "stile", quindi link e sfondo colorati.

Vedi:
http://www.emiltrading.it/joomla/

Qualche idea su come ripristinare i colori?
: Re:Come ripristinare stile Topmenu
: conti1 22 Jan 2011, 23:27:38
ciao
devi guardare nel idex.php del template la posizione originale del topmenu  come è impostato lo style, visto lo stile lo metti  nella posizione user 1.
: Re:Come ripristinare stile Topmenu
: gnagnibu 24 Jan 2011, 08:23:39
Ho provato a dare un'occhiata al file che mi avete suggerito, ma non trovo niente di utile, probabilmente data dalla mia scarsa conoscenza. Mi dareste una mano? Non potendo allegare il file, lo posto qui di seguito.

Index.php :

:
<?php
/**
i-cons003 Template for Joomla

Das i-cons003 Template fuer Joomla von i-cons.ch steht unter der CC BY-SA 2.5 Lizenz
Mehr Infos unter: http://creativecommons.org/licenses/by-sa/2.5/ch/
oder http://www.i-cons.ch

**/

defined('_JEXEC') or die('Restricted access'); // no direct access
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR 'functions.php';
$document = isset($this) ? $this null;
$baseUrl $this->baseurl;
$templateUrl $this->baseurl '/templates/' $this->template;
artxComponentWrapper($document);

$paramThemeColor $this->params->get('ThemeColor');
$paramHeaderHeigth $this->params->get('HeaderHeigth');
$paramThemeBackgroundImage $this->params->get('ThemeBackgroundImage');
$paramLogo $this->params->get('Logo');
$paramLogoText $this->params->get('LogoText');
$paramSloganText $this->params->get('SloganText');
$paramMenuIcon $this->params->get('MenuIcon');
$paramCopyrightText $this->params->get('CopyrightText');


if (
$paramThemeColor) {
$templateColor "/$paramThemeColor";
}
if (!
$paramThemeBackgroundImage) {
$css .= ".PageBackgroundGlareImage { background-image: none; }";
}
if (!
$paramMenuIcon) {
$css .= ".header-tag-icon { background-image: none; padding: 0; margin: 0; }";
}

$css .= "div.Header { height: ".$paramHeaderHeigth."px; }\ndiv.Header-jpeg { height: ".$paramHeaderHeigth."px; }";

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language?>" lang="<?php echo $this->language?>" >
 <head>
  <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<jdoc:include type="head" />
  <link rel="stylesheet" href="<?php echo $this->baseurl?>/templates/system/css/system.css" type="text/css" />
  <link rel="stylesheet" href="<?php echo $this->baseurl?>/templates/system/css/general.css" type="text/css" />

  <link rel="stylesheet" type="text/css" href="<?php echo $templateUrl.$templateColor?>/css/template.css" />
  <!--[if IE 6]><link rel="stylesheet" href="<?php echo $templateUrl.$templateColor?>/css/template.ie6.css" type="text/css" media="screen" /><![endif]-->
  <!--[if IE 7]><link rel="stylesheet" href="<?php echo $templateUrl.$templateColor?>/css/template.ie7.css" type="text/css" media="screen" /><![endif]-->
  <link rel="stylesheet" type="text/css" href="<?php echo $templateUrl.$templateColor?>/css/template-ic.css" />
  <script type="text/javascript" src="<?php echo $templateUrl?>/script.js"></script>
<?php
if (
$css) {
echo "
<style type=\"text/css\">
$css
</style>
"
;
}
?>


 </head>
<body>
    <div class="PageBackgroundGradient"></div>
<div class="PageBackgroundGlare">
    <div class="PageBackgroundGlareImage"></div>
</div>
<div class="Main">
<div class="Sheet">
    <div class="Sheet-tl"></div>
    <div class="Sheet-tr"></div>
    <div class="Sheet-bl"></div>
    <div class="Sheet-br"></div>
    <div class="Sheet-tc"></div>
    <div class="Sheet-bc"></div>
    <div class="Sheet-cl"></div>
    <div class="Sheet-cr"></div>
    <div class="Sheet-cc"></div>
    <div class="Sheet-body">
   
<?php
  
if (artxCountModules($document'breadcrumb') || artxCountModules($document'user4')) {
  
echo "<div class=\"icTop\">";
   
echo "<div class=\"icSearch\">"
  echo artxPost(nullartxModules($document'user4'));
    echo 
"</div>";    
    echo 
artxPost(nullartxModules($document'breadcrumb'));
    echo 
"</div>";
  }

?>



<div class="Header">
  <div class="Header-jpeg"></div>
   

<div class="logo">
<?php if ($paramLogo) { ?>
<img src="<?php echo $templateUrl?>/logo.png">
<?php } else { ?>
<h1 id="name-text" class="logo-name"><a href="<?php echo $baseUrl?>/"><?php echo $paramLogoText?></a></h1>
<div id="slogan-text" class="logo-text"><?php echo $paramSloganText?></div>
<?php ?>
</div>

</div>

<jdoc:include type="modules" name="breadcrumbs" />

<jdoc:include type="modules" name="user3" />
<jdoc:include type="modules" name="banner1" style="xhtml" />
<?php echo artxPositions($document, array('top1''top2''top3'), 'artblock'); ?>
<div class="contentLayout">
<?php if (artxCountModules($document'left')) : ?>
<div class="sidebar1"><?php echo artxModules($document'left''artblock'); ?>
</div>
<?php endif; ?>
<div class="<?php echo artxCountModules($document'left') ? 'content' 'content-wide'?>">

<?php
  
echo artxModules($document'banner2''xhtml');
  if (
artxCountModules($document'user1') || artxCountModules($document'user2')) {
  echo "<div class=\"icMessage\">";
  echo artxPositions($document, array('user1''user2'), 'artpost');
  echo "</div>";
}
  echo 
artxModules($document'banner3''xhtml');
?>


<?php if (artxHasMessages()) : ?><div class="Post">
    <div class="Post-body">
<div class="Post-inner">
<div class="PostContent">

<jdoc:include type="message" />

</div>
<div class="cleared"></div>

</div>

    </div>
</div>
<?php endif; ?>
<jdoc:include type="component" />

<?php echo artxPositions($document, array('user5'), 'artpost'); ?>
<?php echo artxModules($document'banner5''xhtml'); ?>
</div>

</div>
<div class="cleared"></div>

<?php echo artxPositions($document, array('bottom1''bottom2''bottom3'), 'artblock'); ?>
<jdoc:include type="modules" name="banner6" style="xhtml" />
<div class="Footer">
 <div class="Footer-inner">
  <?php echo artxModules($document'syndicate'); ?>
  <div class="Footer-text">
  <?php 
  
if (artxCountModules($document'copyright') == 0) {
echo "<p>$paramCopyrightText</p>";
} else {
  
echo artxModules($document'copyright''xhtml');
  }
?>

  </div>
 </div>
 <div class="Footer-background"></div>
</div>

    </div>
</div>
<div class="cleared"></div>
<p class="page-footer">Designed by Vecchi Giovanni</p>
</div>

</body>
</html>


Grazie
: Re:Come ripristinare stile Topmenu
: conti1 24 Jan 2011, 14:37:51
ciao
devi modificare le posizioni user1-2 xche hai uno stile artpost
e il menu  non deve avere quello visto  che la posizione del menu dovrebbe essere la user3 e non vedo style.

curiosità xchè lo vuoi mettere li un menu?
quando hai gia una colonna left x mettere i menu?
: Re:Come ripristinare stile Topmenu
: gnagnibu 24 Jan 2011, 15:09:30
Quindi dici che basta modificare:

:
if (artxCountModules($document, 'user1') || artxCountModules($document, 'user2' || artxCountModules($document, 'user3')) {
  echo "<div class=\"icMessage\">";
  echo artxPositions($document, array('user1', 'user2', 'user3'), 'artpost');
  echo "</div>";
}

?!?!?

Ho già mainmenu nella colonna left, ma volevo replicarlo anche con un topmenu.
: [SOLVED] Re:Come ripristinare stile Topmenu
: gnagnibu 25 Jan 2011, 17:00:00
Allora, ho trovato il nodo della questione.
Il topmenu era in user3 e avevo provato a spostarlo in banner2
Ho ripristinato il topmenu ai valori di default (quelli che imposta Joomla in una nuova installazione); volendo mantenere lo style, spostando però il topmenu, il file da moficare (nel caso di questo mio template) è: joomla/templates/emiltrading/html/mod_mainmenu/default.php alle righe:

:
...
if ($attribs['name'] == 'user3') {
        $GLOBALS['menu_showSubmenus'] = true && 1 == $params->get('showAllChildren');
        $xml = modMainMenuHelper::getXML($params->get('menutype'), $params, 'modMainMenuArtXMLCallback');
        if ($xml) {
                $xml->addAttribute('class', 'artmenu');
                if ($tagId = $params->get('tag_id')) {
                        $xml->addAttribute('id', $tagId);
                }
                $result = JFilterOutput::ampReplace($xml->toString((bool)$params->get('show_whitespace')));
                $result = str_replace(array('<ul/>', '<ul />'), '', $result);
                echo '<div class="nav"><div class="l"></div><div class="r"></div>' . $result . '</div>';
        }
} else {
        modMainMenuHelper::render($params, 'modMainMenuXMLCallback');
}
...

dove basta modificare la condizione dell'if  'user3' e metterci il valore della nuova posizione.
Scusate del casino che ho fatto, ma non sono ancora molto pratico.

PS: il template che sto usando l'ho creato modificando appena il template i-cons003 : http://www.i-cons.ch