Menu
Web Design | SEO | Website Development

UK Based Web Agency, Magento & Wordpress Specialist (Cranleigh | Surrey)

Easy Magento Layout Modification Using Custom Layout & CSS

By In Magento Development On 30/09/2014


This is a great little tweak I’ve found that I use for all sorts things in Magento, it has many applications.

It give the ability to hide content in specific Product Pages, Category Pages or CMS Pages (not golbally) without the need for custom templates.

All you do is add this code to Custom Layout Update in the relevant pages

<reference name="head">
 <action method="addCss">
 <stylesheet>css/custom.css</stylesheet>
 <params>media="all"</params>
 </action>
</reference>

Then put a css file called custom.css in your templates css folder: /home/USER/public_html/skin/frontend/default/TEMPLATE/css

custom.css will then only be loaded on that product, category or CMS page.

To hide content simply use display:none in the relevant classe/s.

& Robert’s your Father’s Brother.

Note – you can obvivously use this multiple times by adding extra css sheets to the layout update.

<stylesheet>css/custom2.css</stylesheet>

About the Author

Dan Vince

Yet another Web Development Professional

Related Posts

Leave a comment