【问题标题】:Static block covering main column and left sidebar (on 3 columns layout)覆盖主列和左侧边栏的静态块(在 3 列布局上)
【发布时间】:2012-05-14 03:11:45
【问题描述】:

我试图弄清楚如何在 3 列布局上覆盖主列和左侧边栏的空间。 页面在第一部分有 3 列,在下部有 2 列左侧边栏。

这是我的主页,我不需要新的布局,因为主页是唯一使用当前 3 列布局的页面。

获得此设计的最佳方式是什么?
是否可以将其作为静态块?

【问题讨论】:

  • 老实说,即使只是主页,您也可能想要添加新的页面布局。

标签: css magento layout


【解决方案1】:

所以作为第一步,我已将其添加到 /app/etc/local.xml

 <cms> 
 <layouts> 
 <homepage> 
 <label>Home Page</label> 
 <template>page/home-page.phtml</template> 
 <layout_handle>home_page</layout_handle> 
 </homepage> 
 </layouts> 
 </cms>

并创建了一个名为 home-page.phtml 的 3 列布局的副本:

app\design\frontend......\template\page\home-page.phtml

现在我有了一个新的布局,但不幸的是我不知道如何编辑以获得结果。

问这个我觉得有点不舒服,但我对布局设计真的很陌生,我不知道如何编辑我的新主页.phtml,希望你能理解我。

文件如下所示:

<head>
<?php echo $this->getChildHtml('head') ?>
</head>
<body<?php echo $this->getBodyClass()?' class="'.$this->getBodyClass().'"':'' ?>>
<?php echo $this->getChildHtml('after_body_start') ?>
<div class="wrapper">
    <?php echo $this->getChildHtml('global_notices') ?> 
    <div class="centerbg">
    <div class="bottombg">
    <div class="topcurve">
    <div class="page">      
        <?php echo $this->getChildHtml('header') ?>
        <div class="main-container col3-layout">
            <div class="main">                
                    <div class="col-left sidebar"><?php echo $this->getChildHtml('left') ?></div>
                    <div class="col-main">
                        <?php echo $this->getChildHtml('breadcrumbs') ?>                 
                        <?php echo $this->getChildHtml('global_messages') ?>
                        <?php echo $this->getChildHtml('content') ?>
                    </div> 
                    <div class="col-right sidebar"><?php echo $this->getChildHtml('right') ?></div>                
            </div>
        </div>      
        <?php echo $this->getChildHtml('footer') ?>
        <?php echo $this->getChildHtml('before_body_end') ?>
    </div>  
    </div></div></div>
</div>
<?php echo $this->getAbsoluteFooter() ?>
</body>
</html>

我想我也需要新的 CSS 类,对吧?

【讨论】:

    猜你喜欢
    • 2013-02-01
    • 1970-01-01
    • 2021-06-25
    • 1970-01-01
    • 2013-03-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-08-31
    相关资源
    最近更新 更多