Wednesday, 18 December 2013

Add CSS to specific CMS page Magento


Add CSS to specific CMS page Magento

CMS pages in Magento allow you to modify the layout XML specific to that page. So, all you need to do is open up the CMS page in Magento that you want to add the javascript to, click on the “Design” tab on the left, and in the “Layout Update XML” field add the following code:

Step 1

1) Login to magento admin panel.
2) Select CMS –> Pages from menu.

Step 2

3)Select your CMS page and go to Design tab in the left menu.

Add following lines in “Layout Update XML”
<reference name="head">
  <action method="addItem">
    <type>skin_css</type><script>css/main.css</script>
  </action>
</reference>

No comments: