Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Modifiche topmenu
 
djmatto
Jr. Member
 
Total Posts:  5
Joined:  2009-01-14
 

Salve ho installato magento 1.2 e mi da nel topmenu la scelta tra furniture, elettronics ma io vorrei metterci HOME | CHI SIAMO | FAQ
come devo fare?dove devo andare?Grazie infinite per l’aiuto

 
Magento Community Magento Community
Magento Community
Magento Community
 
Black Cat
Moderator
 
Avatar
Total Posts:  3481
Joined:  2008-02-14
Assemini / Cagliari (Italy)
 

la via più semplice è creare un blocco nuovo e sostituirlo al catalogo. Ovviamente poi il catalogo dovrai spostarlo altrove.

 
Magento Community Magento Community
Magento Community
Magento Community
 
djmatto
Jr. Member
 
Total Posts:  5
Joined:  2009-01-14
 

Scusa ma ho creato il nuovo blocco statico poi sono andato sotto Catalogo/Gestione categorie e qui gli ho dato nuova categoria ed ho inserito i parametri:
Name: Topmenu
Is Active: yes
Display Mode: Solo blocco statico
CMS Block: Topmenu
Is anchor:no

Il resto ho lasciato tutto vuoto, però non succede nulla ed il topmenu no me lo crea!Grazie mille per il tuo aiuto

 
Magento Community Magento Community
Magento Community
Magento Community
 
Black Cat
Moderator
 
Avatar
Total Posts:  3481
Joined:  2008-02-14
Assemini / Cagliari (Italy)
 

Hai un link in cui possa vedere l’installazione? Comunque non basta creare il blocco (occhio dovresti dargli un identifier), bisogna anche richiamarlo tramite l’html e sui xml

Allora in page.xml devi inserire queste righe di codice

<block type="cms/block" name="topmenu">
<action method="setBlockId"><block_id>topmenu</block_id></action>
</block>

La posizione dove inserire queste righe cambia a seconda della tua grafica comunque per farti un esempio se si trova dentro il blocco header devi inserire queste righe dentro i tag block dell’header.

Infine vai sul file html in cui vuoi che compaia e scrivi <?php echo $this->getChildHtml('topMenu') ?>

TI consiglio di cambiare il nome dell’identificatore in quanto esiste già il blocco topmenu

ciao

 
Magento Community Magento Community
Magento Community
Magento Community
 
djmatto
Jr. Member
 
Total Posts:  5
Joined:  2009-01-14
 

Allora io ho modificato il file page.xml dentro app/design/frontend/default/default/layout

<?xml version="1.0"?>
<!--
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @category   design_default
 * @package    Mage
 * @copyright  Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
 * @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
-->
<
layout version="0.1.0">
<!--
Default 
layoutloads most of the pages
-->

    <default>
        <
block type="page/html" name="root" output="toHtml" template="page/3columns.phtml">

            <
block type="page/html_head" name="head" as="head">
                <
action method="addJs"><script>prototype/prototype.js</script></action>
                <
action method="addJs" ifconfig="dev/js/deprecation"><script>prototype/deprecation.js</script></action>
                <
action method="addJs"><script>prototype/validation.js</script></action>
                <
action method="addJs"><script>scriptaculous/builder.js</script></action>
                <
action method="addJs"><script>scriptaculous/effects.js</script></action>
                <
action method="addJs"><script>scriptaculous/dragdrop.js</script></action>
                <
action method="addJs"><script>scriptaculous/controls.js</script></action>
                <
action method="addJs"><script>scriptaculous/slider.js</script></action>
                <
action method="addJs"><script>varien/js.js</script></action>
                <
action method="addJs"><script>varien/form.js</script></action>
                <
action method="addJs"><script>varien/menu.js</script></action>
                <
action method="addJs"><script>mage/translate.js</script></action>
                <
action method="addJs"><script>mage/cookies.js</script></action>
                <
action method="addCss"><stylesheet>css/reset.css</stylesheet></action>
                <
action method="addCss"><stylesheet>css/boxes.css</stylesheet></action>
                <
action method="addCss"><stylesheet>css/menu.css</stylesheet></action>
                <
action method="addCss"><stylesheet>css/clears.css</stylesheet></action>

                <
action method="addItem"><type>skin_css</type><name>css/iestyles.css</name><params/><if>IE</if></action>
                <
action method="addItem"><type>skin_css</type><name>css/ie7minus.css</name><params/><if>lt IE 7</if></action>

                <
action method="addItem"><type>js</type><name>lib/ds-sleight.js</name><params/><if>lt IE 7</if></action>
                <
action method="addItem"><type>js</type><name>varien/iehover-fix.js</name><params/><if>lt IE 7</if></action>

                <
action method="addCss"><stylesheet>css/print.css</stylesheet><params>media="print"</params></action>
            </
block>

            <
block type="page/html_header" name="header" as="header">
                <
block type="page/template_links" name="top.links" as="topLinks"/>
                <
block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/>
                <
block type="core/text_list" name="top.menu" as="topMenu"/>


                                              <
block type="cms/block" name="menuprincipale">
                                              <
action method="setBlockId"><block_id>menuprincipale</block_id></action>
                                              </
block>
            </
block>

            <
block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs"/>

            <
block type="core/text_list" name="left" as="left"/>

            <
block type="core/messages" name="global_messages" as="global_messages"/>
            <
block type="core/messages" name="messages" as="messages"/>

            <
block type="core/text_list" name="content" as="content"/>

            <
block type="core/text_list" name="right" as="right"/>

            <
block type="page/html_footer" name="footer" as="footer" template="page/html/footer.phtml">
                <
block type="page/switch" name="store_switcher" as="store_switcher" template="page/switch/stores.phtml"/>
                <
block type="page/template_links" name="footer_links" as="footer_links" template="page/template/links.phtml"/>
            </
block>

            <
block type="core/text_list" name="before_body_end" as="before_body_end"/>
        </
block>

        <
block type="core/profiler" output="toHtml"/>
    </default>

    <print>
        <!-- 
Mage_Page -->
        <
block type="page/html" name="root" output="toHtml" template="page/print.phtml">

            <
block type="page/html_head" name="head" as="head">
                <
action method="addJs"><script>prototype/prototype.js</script></action>
                <
action method="addJs"><script>mage/translate.js</script></action>
                <
action method="addJs"><script>prototype/validation.js</script></action>
                <
action method="addJs"><script>varien/js.js</script></action>

                <
action method="addCss"><stylesheet>css/reset.css</stylesheet></action>
                <
action method="addCss"><stylesheet>css/boxes.css</stylesheet></action>
                <
action method="addCss"><stylesheet>css/menu.css</stylesheet></action>
                <
action method="addCss"><stylesheet>css/clears.css</stylesheet></action>

                <
action method="addItem"><type>skin_css</type><name>css/iestyles.css</name><params/><if>IE</if></action>
                <
action method="addItem"><type>skin_css</type><name>css/ie7minus.css</name><params/><if>lt IE 7</if></action>

                <
action method="addItem"><type>js</type><name>lib/ds-sleight.js</name><params/><if>lt IE 7</if></action>
                <
action method="addItem"><type>js</type><name>varien/iehover-fix.js</name><params/><if>lt IE 7</if></action>

                <
action method="addCss"><stylesheet>css/print.css</stylesheet><params>media="print"</params></action>
            </
block>

            <
block type="core/text_list" name="content" as="content"/>

        </
block>
    </print>
</
layout>

Dopo sono andato nel file header.phtml dentro app/design/frontend/default/default/template/page/html
eccolo:

<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @category   design_default
 * @package    Mage
 * @copyright  Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
 * @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
?>

<div class="header-top-container">
    <
div class="header-top">
        <
h1 id="logo"><a href="<?php echo $this->getUrl('') ?>"><img src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" /></a></h1>
        <
div id="menuprincipale">
        
<?php echo $this->getChildHtml('menuprincipale'?>
        
</div>
        <
class="no-display"><a href="#main"><strong><?php echo $this->__('Skip to Main Content'?> &raquo;</strong></a></p>
        
<?php echo $this->getChildHtml('topSearch'?>
        
<div class="quick-access">
           
<?php echo $this->getWelcome() ?><br />
            <
div class="shop-access">
                
<?php echo $this->getChildHtml('topLinks'?>
            
</div>
            
<?php echo $this->getChildHtml('store_language'?>
        
</div>
    </
div>
</
div>
<?php echo $this->getChildHtml('topMenu'?>

L’identificativo l’ho cambiato in menuprincipale
Adesso però, lasciando le stesse impostazioni dentro Gestione Categorie dal pannello amministrativo di Magento nel frontend non succede nulla, ed anche usando firebug il div menuprincipale dentro l’header è vuoto!
Dove sbaglio?
Grazie mille e scusa per le continue richieste

 
Magento Community Magento Community
Magento Community
Magento Community
 
Black Cat
Moderator
 
Avatar
Total Posts:  3481
Joined:  2008-02-14
Assemini / Cagliari (Italy)
 

hai un link da mostare? Comunque l’identificativo l’hai modificato anche nel backend?

 
Magento Community Magento Community
Magento Community
Magento Community
 
djmatto
Jr. Member
 
Total Posts:  5
Joined:  2009-01-14
 

Guarda non ho link perchè sto lavorando in ocale tramite MAMP!Cosa posso fare?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top