Have had no luck trying to add a reference to a custom.css file to the customer dashboard page in Magento. It makes me want to shoot Magento in the eye, Navy SEAL style.
According to the docs, either of the following inserted into customer.xml in should work:
<reference name="customer_account_dashboard">
<action method="addCss"><link>dashboardfix.css</link></action>
</reference>
<reference name="customer_account_dashboard">
<action method="addCss"><stylesheet>css/dashboardfix.css</stylesheet></action>
</reference>
When inserted before this block:
<reference name="my.account.wrapper">
<block type="customer/account_dashboard" name="customer_account_dashboard" template="customer/account/dashboard.phtml">
<block type="customer/account_dashboard_hello" name="customer_account_dashboard_hello" as="hello" template="customer/account/dashboard/hello.phtml"/>
<block type="core/template" name="customer_account_dashboard_top" as="top" />
<block type="customer/account_dashboard_info" name="customer_account_dashboard_info" as="info" template="customer/account/dashboard/info.phtml"/>
<block type="customer/account_dashboard_newsletter" name="customer_account_dashboard_newsletter" as="newsletter" template="customer/account/dashboard/newsletter.phtml"/>
<block type="clientname/account_dashboard_address" name="customer_account_dashboard_address" as="address" template="customer/account/dashboard/address.phtml"/>
</block>
</reference>
It fails silently (no errors, its as if it wasn’t processed at all)
When inserted after the block, I get an “Invalid method Mage_Customer_Block_Account_Dashboard::addCss(Array ( [0] => css/dashboardfix.css )) error
dashboardfix.css is in the skinname/css folder with my other assets.
Any ideas?
There was a minor syntax error in your code – see corrected code below.
Also, for this to work you need
macguffin.cssfile to be placed in the same css folder as your styles.css (or boxes.css), i.e. the css folder of your theme.You may also want to turn off caching and merging of css files to make sure this is working correctly.
Here is how you should have the complete block:
Just remember, so long as your css file is called
macguffin.cssit will all work out just fine.