如何在cs cart中为前端控制器创建多个布局?

时间:2014-12-22 07:17:46

标签: php cs-cart

我需要为cscart中具有不同模式的一个控制器创建两个单独的布局

我是cs cart的新手。我创建了一个新的博客插件。我遵守了所有后端和前端程序。现在我需要分开布局以显示前端数据。

I have the following code in my layouts.xml


<?xml version="1.0" encoding="UTF-8"?>
<block_scheme scheme="1.0">
    <settings>
        <clean />
        <default_language>en</default_language>
    </settings>
    <location dispatch="postview.view" is_default="0" lang_code="en" name="Blog" title="" meta_description="" meta_keywords="" position="300">
        <containers>
            <container position="TOP_PANEL" width="16" />

            <container position="HEADER" width="16" />

            <container position="CONTENT" width="16" user_class="content-grid">
                <grid width="16" offset="0" user_class="breadcrumbs-grid" omega="1" alpha="1" wrapper="" content_align="FULL_WIDTH" html_element="div" clear="1">
                    <blocks>
                        <block>
                            <type><![CDATA[breadcrumbs]]></type>
                            <properties>
                                <template><![CDATA[common/breadcrumbs.tpl]]></template>
                            </properties>
                            <lang_code><![CDATA[en]]></lang_code>
                            <name><![CDATA[Breadcrumbs]]></name>
                            <object_id><![CDATA[0]]></object_id>
                            <object_type />
                            <content />
                            <object_ids />
                            <wrapper />
                            <user_class />
                            <order><![CDATA[0]]></order>
                            <status><![CDATA[A]]></status>
                            <translations />
                        </block>
                    </blocks>
                </grid>
                 <grid width="4" user_class="side-grid" status="A" offset="0" omega="0" alpha="1" wrapper="" content_align="FULL_WIDTH" html_element="div" clear="0">
                    <blocks>
                        <block>
                            <type>BLOG CATEGORIES</type>
                            <properties>
                                <template><![CDATA[addons/blog/blocks/blogcategory.tpl]]></template>
                            </properties>
                            <lang_code><![CDATA[en]]></lang_code>
                            <name>BLOG CATEGORIES</name>
                            <object_id><![CDATA[]]></object_id>
                            <object_type />
                            <content />
                            <object_ids />
                             <wrapper><![CDATA[blocks/wrappers/sidebox_general.tpl]]></wrapper>
                            <user_class />
                            <order><![CDATA[0]]></order>
                            <status><![CDATA[A]]></status>
                            <translations>
                                <translation lang_code="ru">Проверка подарочного сертификата</translation>
                                <translation lang_code="zh">检查礼卷</translation>
                            </translations>
                        </block>

                         <block>
                            <type>ARCHIVE</type>
                            <properties>
                                <template><![CDATA[addons/blog/blocks/yearwisecategoryview.tpl]]></template>
                            </properties>
                            <lang_code><![CDATA[en]]></lang_code>
                            <name>ARCHIVE</name>
                            <object_id><![CDATA[]]></object_id>
                            <object_type />
                            <content />
                            <object_ids />
                            <wrapper><![CDATA[blocks/wrappers/sidebox_general.tpl]]></wrapper>
                            <user_class />
                            <order><![CDATA[1]]></order>
                            <status><![CDATA[A]]></status>
                            <translations>
                                <translation lang_code="ru">Проверка подарочного сертификата</translation>
                                <translation lang_code="zh">检查礼卷</translation>
                            </translations>
                        </block>

                        <block>
                            <type><![CDATA[recentwisepostview]]></type>
                            <properties>
                                <template><![CDATA[addons/blog/blocks/recentwisepostview.tpl]]></template>
                            </properties>
                            <lang_code><![CDATA[en]]></lang_code>
                            <name><![CDATA[recentwisepostview]]></name>
                            <object_id><![CDATA[]]></object_id>
                            <object_type />
                            <content />
                            <object_ids />
                            <wrapper><![CDATA[blocks/wrappers/sidebox_general.tpl]]></wrapper>
                            <user_class />
                            <order><![CDATA[2]]></order>
                            <status><![CDATA[A]]></status>
                            <translations>
                                <translation lang_code="ru">Проверка подарочного сертификата</translation>
                                <translation lang_code="zh">检查礼卷</translation>
                            </translations>
                        </block>

                         <block>
                            <type><![CDATA[searchcategory]]></type>
                            <properties>
                                <template><![CDATA[addons/blog/blocks/searchcategory.tpl]]></template>
                            </properties>
                            <lang_code><![CDATA[en]]></lang_code>
                            <name><![CDATA[searchcategory]]></name>
                            <object_id><![CDATA[]]></object_id>
                            <object_type />
                            <content />
                            <object_ids />
                             <wrapper><![CDATA[blocks/wrappers/sidebox_general.tpl]]></wrapper>
                            <user_class />
                            <order><![CDATA[3]]></order>
                            <status><![CDATA[A]]></status>
                            <translations>
                                <translation lang_code="ru">Проверка подарочного сертификата</translation>
                                <translation lang_code="zh">检查礼卷</translation>
                            </translations>
                        </block>




                    </blocks>

                </grid>
                <grid width="12" user_class="main-content-grid" status="A" offset="0" omega="1" alpha="0" wrapper="" content_align="FULL_WIDTH" html_element="div" clear="1">
                    <blocks>
                        <block>
                            <type><![CDATA[main]]></type>
                            <properties><![CDATA[]]></properties>
                            <lang_code><![CDATA[en]]></lang_code>
                            <name><![CDATA[Main Content]]></name>
                            <object_type><![CDATA[]]></object_type>
                            <content><![CDATA[]]></content>
                            <object_ids><![CDATA[]]></object_ids>
                            <wrapper><![CDATA[blocks/wrappers/mainbox_general.tpl]]></wrapper>
                            <user_class><![CDATA[]]></user_class>
                            <order><![CDATA[2]]></order>
                            <status><![CDATA[A]]></status>
                            <translations>
                                <translation lang_code="ru"><![CDATA[Главное содержимое]]></translation>
                            </translations>
                            <contents />
                        </block>
                    </blocks>
                </grid>

                            </container>

            <container position="FOOTER" width="16" />
        </containers>
        <translations>
            <translation lang_code="ru">
                <meta_keywords><![CDATA[]]></meta_keywords>
                <page_title><![CDATA[]]></page_title>
                <meta_description><![CDATA[]]></meta_description>
                <name>Подарочные сертификаты</name>
            </translation>
            <translation lang_code="zh">
                <meta_keywords><![CDATA[]]></meta_keywords>
                <page_title><![CDATA[]]></page_title>
                <meta_description><![CDATA[]]></meta_description>
                <name>礼券</name>             
            </translation>
        </translations>
    </location>


    <location dispatch="postview.details" is_default="0" lang_code="en" name="Blog Post" title="" meta_description="" meta_keywords="" position="300">
        <containers>
            <container position="TOP_PANEL" width="16" />

            <container position="HEADER" width="16" />

            <container position="CONTENT" width="16" user_class="content-grid">
                <grid width="16" offset="0" user_class="breadcrumbs-grid" omega="1" alpha="1" wrapper="" content_align="FULL_WIDTH" html_element="div" clear="1">
                    <blocks>
                        <block>
                            <type><![CDATA[breadcrumbs]]></type>
                            <properties>
                                <template><![CDATA[common/breadcrumbs.tpl]]></template>
                            </properties>
                            <lang_code><![CDATA[en]]></lang_code>
                            <name><![CDATA[Breadcrumbs]]></name>
                            <object_id><![CDATA[0]]></object_id>
                            <object_type />
                            <content />
                            <object_ids />
                            <wrapper />
                            <user_class />
                            <order><![CDATA[0]]></order>
                            <status><![CDATA[A]]></status>
                            <translations />
                        </block>
                    </blocks>
                </grid>
                         <grid width="4" user_class="side-grid" status="A" offset="0" omega="0" alpha="1" wrapper="" content_align="FULL_WIDTH" html_element="div" clear="0">
                    <blocks>
                        <block>
                            <type><![CDATA[blogcategory]]></type>
                            <properties>
                                <template><![CDATA[addons/blog/blocks/blogcategory.tpl]]></template>
                            </properties>
                            <lang_code><![CDATA[en]]></lang_code>
                            <name><![CDATA[blogcategory]]></name>
                            <object_id><![CDATA[]]></object_id>
                            <object_type />
                            <content />
                            <object_ids />
                             <wrapper><![CDATA[blocks/wrappers/sidebox_general.tpl]]></wrapper>
                            <user_class />
                            <order><![CDATA[0]]></order>
                            <status><![CDATA[A]]></status>
                            <translations>
                                <translation lang_code="ru">Проверка подарочного сертификата</translation>
                                <translation lang_code="zh">检查礼卷</translation>
                            </translations>
                        </block>

                         <block>
                            <type><![CDATA[yearwisecategoryview]]></type>
                            <properties>
                                <template><![CDATA[addons/blog/blocks/yearwisecategoryview.tpl]]></template>
                            </properties>
                            <lang_code><![CDATA[en]]></lang_code>
                            <name><![CDATA[YearCategory]]></name>
                            <object_id><![CDATA[]]></object_id>
                            <object_type />
                            <content />
                            <object_ids />
                            <wrapper><![CDATA[blocks/wrappers/sidebox_general.tpl]]></wrapper>
                            <user_class />
                            <order><![CDATA[1]]></order>
                            <status><![CDATA[A]]></status>
                            <translations>
                                <translation lang_code="ru">Проверка подарочного сертификата</translation>
                                <translation lang_code="zh">检查礼卷</translation>
                            </translations>
                        </block>

                        <block>
                            <type><![CDATA[recentwisepostview]]></type>
                            <properties>
                                <template><![CDATA[addons/blog/blocks/recentwisepostview.tpl]]></template>
                            </properties>
                            <lang_code><![CDATA[en]]></lang_code>
                            <name><![CDATA[recentwisepostview]]></name>
                            <object_id><![CDATA[]]></object_id>
                            <object_type />
                            <content />
                            <object_ids />
                            <wrapper><![CDATA[blocks/wrappers/sidebox_general.tpl]]></wrapper>
                            <user_class />
                            <order><![CDATA[2]]></order>
                            <status><![CDATA[A]]></status>
                            <translations>
                                <translation lang_code="ru">Проверка подарочного сертификата</translation>
                                <translation lang_code="zh">检查礼卷</translation>
                            </translations>
                        </block>

                         <block>
                            <type><![CDATA[searchcategory]]></type>
                            <properties>
                                <template><![CDATA[addons/blog/blocks/searchcategory.tpl]]></template>
                            </properties>
                            <lang_code><![CDATA[en]]></lang_code>
                            <name><![CDATA[searchcategory]]></name>
                            <object_id><![CDATA[]]></object_id>
                            <object_type />
                            <content />
                            <object_ids />
                             <wrapper><![CDATA[blocks/wrappers/sidebox_general.tpl]]></wrapper>
                            <user_class />
                            <order><![CDATA[3]]></order>
                            <status><![CDATA[A]]></status>
                            <translations>
                                <translation lang_code="ru">Проверка подарочного сертификата</translation>
                                <translation lang_code="zh">检查礼卷</translation>
                            </translations>
                        </block>




                    </blocks>

                </grid>

                <grid width="12" user_class="main-content-grid" status="A" offset="0" omega="1" alpha="0" wrapper="" content_align="FULL_WIDTH" html_element="div" clear="1">
                    <blocks>
                        <block>
                            <type><![CDATA[main]]></type>
                            <properties><![CDATA[]]></properties>
                            <lang_code><![CDATA[en]]></lang_code>
                            <name><![CDATA[Main Content]]></name>
                            <object_type><![CDATA[]]></object_type>
                            <content><![CDATA[]]></content>
                            <object_ids><![CDATA[]]></object_ids>
                            <wrapper><![CDATA[blocks/wrappers/mainbox_general.tpl]]></wrapper>
                            <user_class><![CDATA[]]></user_class>
                            <order><![CDATA[2]]></order>
                            <status><![CDATA[A]]></status>
                            <translations>
                                <translation lang_code="ru"><![CDATA[Главное содержимое]]></translation>
                            </translations>
                            <contents />
                        </block>


                    </blocks>
                </grid>

                            </container>

            <container position="FOOTER" width="16" />
        </containers>
        <translations>
            <translation lang_code="ru">
                <meta_keywords><![CDATA[]]></meta_keywords>
                <page_title><![CDATA[]]></page_title>
                <meta_description><![CDATA[]]></meta_description>
                <name>Подарочные сертификаты</name>
            </translation>
            <translation lang_code="zh">
                <meta_keywords><![CDATA[]]></meta_keywords>
                <page_title><![CDATA[]]></page_title>
                <meta_description><![CDATA[]]></meta_description>
                <name>礼券</name>             
            </translation>
        </translations>
    </location>


</block_scheme>



I have the separate layout. But i have the four sidebox in right side.But It display one one .How To solve .Please help me.

1 个答案:

答案 0 :(得分:0)

这是关于在我们的cs-cart网站下创建博客。由于CMS或附加组件存在一些漏洞,我们计划自己创建一个博客。请让我知道完成此操作后要遵循的步骤。