May 21

magento — remove h1 heading from cms page

how to remove the title that appears above the cms content of cms page? from the cms.xml layout file i found the code below:

just remove this line

<block type="core/template" name="page_content_heading" template="cms/content_heading.phtml"/>
Source code    
<cms_page translate="label">
        <label>CMS Pages (All)</label>
        <reference name="content">
            <block type="core/template" name="page_content_heading" template="cms/content_heading.phtml"/>
            <block type="page/html_wrapper" name="cms.wrapper" translate="label">
                <label>CMS Content Wrapper</label>
                <action method="setElementClass"><value>std</value></action>
                <block type="cms/page" name="cms_page"/>
            </block>
        </reference>
    </cms_page>

then the h1 title of all the cms page will go.but what if you want to do this only to some specific page?you have two choice,first,you can make use of magento layout update feature for cms page.

Goto menu CMS => Pages => Click the page you want to edit => Design => Layout Update XML

add the xml code below:

Source code    
<reference name="content">
            <remove name="page_content_heading"/>
</reference>

the other way is update the cms.xml file directly in your theme layout folder.

May 09

Chrome won’t allow IFRAME to load a html file via http while main page using https

i just found a weird thing that the Chrome browser don’t allow an iframe to load a http url when the current url in the addr bar begin with https.for eample,if the current page’s url is:

https://www.abcdomain.com/abc-xyz.html

and it contains an iframe whose src is

http://www.anotherdomain.com/test-xyz.html

then,it worked ok in Firefox browser but  the iframe break in Chrome.
after google for a while,i get some conclusion when calling a page from other domain with diff protocol,:

page – iframe – status
http – http  – allowed
http – https – allowed
https- http  – not allowed
https- https – not allowed

for more related info,please refer to the following url

http://stackoverflow.com/questions/9280665/insecure-content-in-iframe-on-secure-page

http://stackoverflow.com/questions/18223028/google-chrome-wont-allow-iframe-to-load-a-html-file

 

Posted in web