0

I am trying to modify the layout of the free iPhone theme that Magento provides for mobile devices. The majority of the theme will suffice for our purposes but currently the homepage only shows the header and the categories.

I am looking for the best way to add some content (few pictures, text) to the home page on the mobile version only.

What would be the best way to approach this? Static Blocks? Would I insert them in the iPhone themes XML layout files? If so which XML would they go in?

If that is the proper way would this be the correct way to insert?

<block type="cms/block" name="ExampleBlockName"></block>
  • how you will manage mobile means how you have setup mobile theme? – Amit Bera Mar 23 '16 at 17:56
0

Yes,you should first create a static block which contain few pictures, texts

Then call that static block from a layout file of iPhone theme.

Suppose,you have using magento default iphone theme. Now you can call your static block using below code

<cms_index_index>
    <reference name="content">
        <block type="cms/block" name="iphonestatic" >
            <!--
                The content of this block is taken from the database by its block_id.
                You can manage it in admin CMS -> Static Blocks
            -->
            <action method="setBlockId"><block_id>YOUR_STATIC_BLOCK_ID</block_id></action>
        </block>
         </reference>
</cms_index_index>

by adding the code at app/design/frontend/default/iphone/layout at any layout file.

As you have call this static block at your iphone theme then it does not called at any other theme as you does not call this static block at any other themes.

  • Thank you, that got me going in the right direction. I am able to see the test static block I made in the mobile theme. What is weird however is that that same static block shows up on my main theme on the product pages only. I am editing the cms.xml file inside of the iphone theme folder. Going to have to look into it more and try to figure out why this is happening. – John Deszell Mar 25 '16 at 13:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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