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 & Best Regards, Zohaib
2 ACCEPTED SOLUTIONS

Accepted Solutions

Re: Custom left/right menu block in magento

Hi @shahabfk

 

We have solved your query.

 

You faced the issued as you were not following the xml format.

 

Kindly follow the xml format mentioned below.

 

You just need to add code between layout start to layout end.

 

You can also view your server file.

<?xml version="1.0"?>
<layout version="0.1.0">
</layout>

 

Query solved? Accept as Solution.Thanks
Eric Baily

View solution in original post

Re: Custom left/right menu block in magento

Hi @shahabfk

 

You can show records from database table in block with same CSS as other blocks from following link:

http://hrms-systems.com/mgdemo/custom-output

You can call config.xml in module's front name, you need to call the same front name in the URL to get the results.

 

Hope it helps you.

Query solved? Accept as Solution.Thanks
Eric Baily

View solution in original post

16 REPLIES 16

Re: Custom left/right menu block in magento

@shahabfk

 

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>
Was my answer helpful? You can accept it as a solution.
175+ Professional Extensions for M1 & M2
Need a developer?Just visit Contact Us Now

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 & Best Regards, Zohaib

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 @shahabfk

 

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

Was my answer helpful? You can accept it as a solution.
175+ Professional Extensions for M1 & M2
Need a developer?Just visit Contact Us Now

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 & Best Regards, Zohaib

Re: Custom left/right menu block in magento

Hi @shahabfk,

 
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 & Best Regards, Zohaib

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 & Best Regards, Zohaib

Re: Custom left/right menu block in magento

Hi @shahabfk

 

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