0

I have an extra link for a custom style which is a logo that I should show only in one specific category, category id is 1262 so I did this:

<CATEGORY_1262>
    <reference name="head">
    <block type="core/text" name="mybuyscsscode">
        <action method="setText"><text><![CDATA[<link href="https://customlink.com/BreastCancer.css" rel="stylesheet" type="text/css" id="stylecustom">]]></text></action>
    </block>
</reference>
</CATEGORY_1262>

when I go to the page source I don't see the css in the page. also I did this:

<CATEGORY_1262>
    <reference name="head">
        <action method="setText"><text><![CDATA[<link href="https://customlink.com/BreastCancer.css" rel="stylesheet" type="text/css" id="mybuysstyles">]]></text></action>
    </reference>
</CATEGORY_1262>

none of them work, I do not have access to the code today so I have to do it by xml update, do I have any options to do it right?

1

You will need to just add below code in custom layout update for that category. It will only add it for that category. So remove <CATEGORY_1262> from your layout.

<reference name="head">
    <block type="core/text" name="mybuyscsscode">
        <action method="setText"><text><![CDATA[<link href="https://28166fc2113f28b37ea14b5f7cfe49f060ffe20f.googledrive.com/host/0B4y9LnI3CsdpfjlhYkJnV2ZIRlZHWFZXTmR5SnR6VWVHWXRrOHZnZGVZMmgxcnYxSEhJaGs/BreastCancer.css" rel="stylesheet" type="text/css" id="stylecustom">]]></text></action>
    </block>
</reference>
  • hey thanks man! :) I will accept when in 7 minuets! I'm curious why then we needed to do catedory_1262 – Nickool Oct 1 '15 at 17:54

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.