相关疑难解决方法(0)

在不编辑默认模板的情况下,在Magento后端添加自定义仪表板"框"的正确方法是什么?

我正在努力创造我希望有一天会成为Magento公开扩展的部分(这部分我提到因为我在这里做"正确的事"对我来说很重要).我想做的其中一件事是在默认的Magento仪表板中添加一个框,基本上是一个新的"框",与"前5个搜索术语"完全相同,除了我自己的内容.我希望我的新自定义框是显示的最后一个框(理想情况下).

我遇到的问题是,负责呈现仪表板的模板会调出要呈现的特定块,并且这些块嵌套在html中.换句话说,通常存在一个区域,其中子块将被渲染成一个合理的HTML元素,在这种情况下,似乎会呈现特定的块.以下是/app/design/adminhtml/default/default/template/dashboard/index.phtml的内容

  <div class="dashboard-container">
            <?php echo $this->getChildHtml('store_switcher') ?>
            <table cellspacing="25" width="100%">
                <tr>
                    <td><?php echo $this->getChildHtml('sales') ?>
                        <div class="entry-edit">
                            <div class="entry-edit-head"><h4><?php echo $this->__('Last 5 Orders') ?></h4></div>
                            <fieldset class="np"><?php echo $this->getChildHtml('lastOrders'); ?></fieldset>
                        </div>
                        <div class="entry-edit">
                            <div class="entry-edit-head"><h4><?php echo $this->__('Last 5 Search Terms') ?></h4></div>
                            <fieldset class="np"><?php echo $this->getChildHtml('lastSearches'); ?></fieldset>
                        </div>
                        <div class="entry-edit">
                            <div class="entry-edit-head"><h4><?php echo $this->__('Top 5 Search Terms') ?></h4></div>
                            <fieldset class="np"><?php echo $this->getChildHtml('topSearches'); ?></fieldset>
                        </div>
                    </td>
                    <td>
                        <div class="entry-edit" style="border:1px solid #ccc;">
                            <?php echo $this->getChildHtml('diagrams') ?>
                            <?php if (is_array($this->getChild('diagrams')->getTabsIds())) : …
Run Code Online (Sandbox Code Playgroud)

templates dashboard block magento adminhtml

2
推荐指数
1
解决办法
3911
查看次数

标签 统计

adminhtml ×1

block ×1

dashboard ×1

magento ×1

templates ×1