cancel
Showing results for 
Search instead for 
Did you mean: 

Custom left/right menu block in magento

SOLVED

Custom left/right menu block in magento

Hi,

 

I want to show some custom information in front-end left menu block or right menu below or above Poll block.

 

I am looking for an article or guide or any information regarding adding custom left/right menu in magento.

 

How to create box block in left/right side so that custom information can be shown.

-Thanks & Regards,Shahab
Tags (1)
16 REPLIES

Re: Custom left/right menu block in magento

@shahab8288

 

You can add the custom block to Magento sidebar using this.
Create "local.xml" file in your theme layout section and place below code:

<layout version="0.1.0">
<default>
<reference name="right">
<block type="cms/block" name="your-block-identifier" before="-">
<action method="setBlockId"><block_id>your-block-identifier</block_id></action>
</block>
</reference>
</default>
</layout>
Found something useful, please give "Kudos" or "Accept as Solution" for Token of Appreciation.
Free Magento Extensions : https://magecomp.com/free-magento-extensions.html

Re: Custom left/right menu block in magento

Hi,

 

I have created static block (sidebar-right-bottom-mymodule) from admin panel.

 

"setBlockId" = cms_block table block_id

 

I need to place local.xml file in app\design\frontend\base\default\layout or app\code\community\Shahab\Mymodule\etc

 

<layout version="0.1.0">
<default>
<reference name="right">
<block type="cms/block" name="sidebar-right-bottom-mymodule" before="-">
<action method="2"><block_id>sidebar-right-bottom-mymodule</block_id></action>
</block>
</reference>
</default>
</layout>

 

I want to show records from table mymodule in custom block,if I add static block then it will display content from Content text area in static block

 

Please advise.

 

-Thanks & Regards,Shahab

Re: Custom left/right menu block in magento

\app\design\frontend\MyPackage\MyTheme\layout\local.xml create local.xml added the code

<default>
<reference name="left"> <block type="cms/block" name="left-block"> <action method="setBlockId"><block_id>left-block</block_id></action> </block> </reference> <reference name="right"> <block type="cms/block" name="right-block"> <action method="setBlockId"><block_id>right-block</block_id></action> </block> </reference>
</default>
Go to admin and create static block left-block and right-block.  
   
Can't change "method" only change "name", and "block_id" paste your block identifier.
 
Hope this is helpful.
Query solved? Accept as Solution.Thanks
Eric Baily

Re: Custom left/right menu block in magento

Hi @shahab8288

 

local.xml file should be in your current theme directory in the following path and not in any extension.
Magento Root->App->Design->Frontend->[YOUR CURRENT THEME]->layout->local.xml

Found something useful, please give "Kudos" or "Accept as Solution" for Token of Appreciation.
Free Magento Extensions : https://magecomp.com/free-magento-extensions.html

Re: Custom left/right menu block in magento

 Hi,

 

I tried reply to message 3 to 4 times but my message is not showing.

 

I have created local.xml file at default theme location 

app\design\frontend\base\default\layout

 

I am not getting any block in left or right side of the page. Check with clearing and flushing cache,compilation etc.

  

Any idea?

-Thanks & Regards,Shahab

Re: Custom left/right menu block in magento

Hi @shahab8288,

 
Based on the details you provided we have done testing and it is working fine at our end.
 
Can you please share the screenshots of the errors you are facing so, we can investigate further and let you know.
Query solved? Accept as Solution.Thanks
Eric Baily

Re: Custom left/right menu block in magento

Hi,

 

I am not able to post images and URL with uploaded images on server.

 

The post is not showing on magento forum therefore I have created new instance of Magento , uploaded the changes and share FTP details on skype. Also admin login details

 

I hope this will help to investigate problem. As I am not getting any error but no block.

 

 

-Thanks & Regards,Shahab

Re: Custom left/right menu block in magento

Hi,

 

Any update.I have created static blocks and local.xml file. Provided magento instance details on skype.

 

Any idea?

-Thanks & Regards,Shahab

Re: Custom left/right menu block in magento

Hi @shahab8288

 

We have not received any details you sent on skype.

 

Can you pls share your skype ID.

Query solved? Accept as Solution.Thanks
Eric Baily