JM Tages – Can I call a static block

I’m new to Magento, and still getting my head around what we can and can’t do.
I want to call a static block from within the JM Tabs module (in the JM Easyshop template).

This is the rough code I want to use on the home CMS page under design:
————————-
<block type="joomlart_jmtabs/core" name="jmtabs">
<action method="addTabs_block">
<title>Welcome</title>
<block></block>
<template></template>
<alias>tab1-welcome</alias>
</action>
<action method="addTabs_block">
<title>Most Reviewed</title>
<block>joomlart_jmcategorylist/list</block>
<template>joomlart/jmcategorylist/list.phtml</template>
<alias>tab2-jmcategorylist</alias>
</action>
<action method="addTabs_block">
<title>Brands</title>
<alias>tab3-brands</alias>
</action>
</block>
————————-
With this code the first and third tabs are still to be defined.
For the first tab I want to call a static block (which contains an image).
I figured I could use something like the below to achieve this, but it does not worki:

<block type="cms/block" name="cms_address_block" before="contactForm">
<action method="setBlockId"><block_id>voscpd</block_id></action>
</block>

Am I going about this the wrong way, is this not possible, or is there a better way?

Thanks in advance

Will

4 answers

Profile photo of thangnn1510 0.00 $tone January 27, 2011
Public

Dear

Please use this code:

<action method="addTabs_staticblock">
<title>YOUR TITLE</title>
<identifier>your_block_identifier</identifier>
</action>

To call your statick block in to JM tabs.

Hope this helps and good luck! .

#1
Profile photo of thangnn1510 0.00 $tone January 28, 2011
Public

Dear Petersturm!

If you use JM tab, you should call it in jmtabs.xml in app\design\frontend\default\your_theme\layout with this structure:

Code:

<?xml version="1.0"?>
<layout version="0.1.0">
    <default>
		<reference name="head">	
        	<action method="addCss"><stylesheet>joomlart/jmtabs/css/jm.tabs.css</stylesheet></action>
        </reference>
        <reference name="content">        	
			<block type="joomlart_jmtabs/core" name="jmtabs">
				<!--<action method="set">
					<show>1</show>
					<title>JM Tabssss</title>
					<style>pyrite</style>
					<height>auto</height>
					<width>100</width>
					<position>top</position>
					<animation>fadeIn</animation>
					<event>click</event>
					<duration>1000</duration>
					<skipanim>false</skipanim>
				</action>-->
				<action method="addTabs_staticblock">
					<title>Tab 1</title>
					<identifier>footer_links</identifier>
				</action>
                <action method="addTabs_staticblock">
                    <title>header_links</title>
                    <identifier>header_links</identifier>
                </action>
                <action method="addTabs_staticblock">
                    <title>electronics-landing</title>
                    <identifier>electronics-landing</identifier>
                </action>                
                <action method="addTabs_staticblock">
                    <title>cellphones-landing</title>
                    <identifier>cellphones-landing</identifier>
                </action>
				<!--<action method="addTabs_block">					
					<title>jmproducts</title>
					<block>joomlart_jmproducts/list</block>
					<template>joomlart/jmproducts/list.phtml</template>
					<alias>tab1-jmproducts</alias>
				</action>	
				<action method="addTabs_block">					
					<title>jmproductsspotlight</title>
					<block>joomlart_jmproductsspotlight/list</block>
					<template>joomlart/jmproductsspotlight/list.phtml</template>
					<alias>tab1-jmproductsspotlight</alias>
				</action>
				<action method="addTabs_block">					
					<title>jmcategorylist</title>
					<block>joomlart_jmcategorylist/list</block>
					<template>joomlart/jmcategorylist/list.phtml</template>
					<alias>tab1-jmcategorylist</alias>
				</action>-->
			</block>
        </reference>
    </default>
</layout>

You could also use in layout update xml of any static page with this structure:

Code:

<block type="joomlart_jmtabs/core" name="jmtabs">
				<!--<action method="set">
					<show>1</show>
					<title>JM Tabssss</title>
					<style>pyrite</style>
					<height>auto</height>
					<width>100</width>
					<position>top</position>
					<animation>fadeIn</animation>
					<event>click</event>
					<duration>1000</duration>
					<skipanim>false</skipanim>
				</action>-->
				<action method="addTabs_staticblock">
					<title>Tab 1</title>
					<identifier>footer_links</identifier>
				</action>
</block>

Hoep this helps and good luck!

#3
Profile photo of Peter Sturm 0.00 $tone January 28, 2011
Public

Hello thangnn1510,

yes, this is very helpful.
Slowly but surely I understand the structure of Magento.
But it`s truly not easy for an absolutely amateur like me.

Be well

Peter

#4

This question is now closed

Written By

Comments