Tell me more ×
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It's 100% free, no registration required.

i tried to insert image with two different way like through cms pages in that select page and in content use below code

<p><img src="{{skin url='images/media/404_callout1.jpg'}}" alt="" /></p>

and another way is by click on the "insert image" button.

Now Question is That, is there any other way for for insert image in cms page?

share|improve this question

1 Answer

up vote 1 down vote accepted

Using the "Insert Image" button will add the images which are relative to the media wysiwyg directory

img src="{{media url="wysiwyg/filename.jpg"}}" alt="" />

You could also have images stored as the content of a static block and then call them into the cms page contact using either using

{{block type="cms/block" block_id="staticblock_identifier"}}

Or use the widget interface and select Widget Type "CMS Static Block" which will add blocks by id like

{{widget type="cms/widget_block" template="cms/widget/static_block/default.phtml" block_id="10"}}

If you'd like the image to appear just above or below the main content look at adding it through layout XML and adding a static block either for that page using the CMS page design tab or for every CMS page using the "cms_page" layout handle.

If your image is stored as a static block and you'd like it before the main content add the following XML to your page or cms handle.

<reference name="content">
    <block type="cms/block" before="-">
        <action method="setBlockId"><block_id>staticblock_identifier</block_id></action>
    </block> 
</reference>

If you'd like the block to come after the content enter

after="-"
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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