2

I have 2 modules Blog and Recipe.

Blog module has left navigations :

  • Recent posts
  • Most views
  • Categories

configured in as:

\app\design\frontend\base\default\layout\mageplaza_betterblog.xml

<reference name="right">
        <block type="mageplaza_betterblog/sidebar" name="post.list.right" as="post_list_right" before="-">
            <action method="setTemplate" ifconfig="mageplaza_betterblog/general/sidebar_right">
                <template>mageplaza_betterblog/sidebar.phtml</template>
            </action>
        </block>
    </reference>

    <reference name="left">
        <block type="mageplaza_betterblog/sidebar" name="post.list.left" as="post_list_left" before="-">
            <action method="setTemplate" ifconfig="mageplaza_betterblog/general/sidebar_left">
                <template>mageplaza_betterblog/sidebar.phtml</template>
            </action>
        </block>
    </reference>

In my Recipe module, I have left sidebar links as :

  • Recipe Categories
  • Latest Recipes

configured as :

\app\design\frontend\base\default\layout\magenshop\recipe.xml

 <reference name="left">


        <block type="core/template" name="recipe_sidebar_newest" after="-">
            <action ifconfig="magenshoprecipe/general/shownewest" method="setTemplate"><template>magenshop/recipe/recipe_sidebar_newest.phtml</template></action>
        </block>

        <block type="core/template" name="recipe_sidebar_popular" after="-">
            <action ifconfig="magenshoprecipe/general/showpopular" method="setTemplate"><template>magenshop/recipe/recipe_sidebar_popular.phtml</template></action>
        </block>
        <block type="core/template" name="recipemenuleftsidebar" before="-" template="magenshop/recipe/menusidebar.phtml" />
        <!-- <remove name="post_list_left" /> -->
        <action method="unsetChild"><name>post_list_left</name></action>
    </reference>

Now I need to remove all the 3 left sidebar links from 'Blog' module which is conflicting with my recipe module.

ie) In Recipe module, I'm getting the links of Blog module as well.

I had tried to remove the Blog links in recipe.xml as:

<action method="unsetChild"><name>post_list_left</name></action>

But still the links are not getting removed.

1
  • Are you sure your layout is called from base theme Instead of your custom theme ? @Sachin S
    – Keyur Shah
    Commented Feb 7, 2017 at 9:26

1 Answer 1

3

Ok thanks, found the problem,

I used

<remove name="post_list_left" />

in the right place, ie) in my scenario in the category page ie)

<recipe_category_index>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.