Pregunta

Actualmente estoy tratando de mover la búsqueda rápida a mi mensaje de bienvenida en todas las páginas. He ido a mi tema / plantilla / página / html / header.phtml y moví la acogida-msg por encima de la 'topSearch', pero no cambia nada. He mirado en tema / diseño / page.xml , pero no puedo averiguar si hay algo que puedo cambiar allí para hacer que funcione. Soy nuevo en PHP y XML de manera sería apreciado ninguna ayuda.

Aquí está mi page.xml

        <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" translate="label">
                <label>Navigation Bar</label>
                <block type="page/html_topmenu" name="catalog.topnav" template="page/html/topmenu.phtml"/>
            </block>
            <block type="page/html_wrapper" name="top.container" as="topContainer" translate="label">
                <label>Page Header</label>
                <action method="setElementClass"><value>top-container</value></action>
            </block>
        </block>

Y mi header.phtml

<div class="header-container">
    <div class="header">
        <?php if ($this->getIsHomePage()):?>
        <h1 class="logo"><strong><?php echo $this->getLogoAlt() ?></strong><a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>" class="logo"><img src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" /></a></h1>
        <?php else:?>
        <a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>" class="logo"><strong><?php echo $this->getLogoAlt() ?></strong><img src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" /></a>
        <?php endif?>
        <div class="quick-access">
            <p class="welcome-msg"><?php echo $this->getWelcome() ?> <?php echo $this->getAdditionalHtml() ?></p>
            <?php echo $this->getChildHtml('topSearch') ?>
            <?php echo $this->getChildHtml('topLinks') ?>
            <?php echo $this->getChildHtml('store_language') ?>

        </div>
        <div id="phone_number">1(888)641-7988</div>
        <?php echo $this->getChildHtml('topContainer'); ?>
    </div>
</div>
<?php echo $this->getChildHtml('topMenu') ?>

Cualquier ayuda sería muy apreciada.

¿Fue útil?

Solución

Por favor, corrija el CSS, .header .form-search esta clase CSS se utiliza para el estilo formulario de búsqueda y position:absolute se utiliza en esta clase, por lo que eliminar esta y el formulario de búsqueda se mueve por debajo de su mensaje de bienvenida

Otros consejos

En lugar de

<?php echo $this->getChildHtml('topSearch') ?>

utilizar este

<?php $this->getLayout()->getBlock('top.search')->toHtml(); ?>

De esta manera usted puede llamar a su búsqueda en cualquier parte de su archivo .phtml.

creo que usted debe buscar en el CSS. Si se utiliza position: absolute, elementos móviles en html, no ayuda.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a magento.stackexchange
scroll top