Tuesday, December 31, 2013
Replace/Remove Non-Breaking Space in ASPDNSF XSLT
Solution: Use the StrReplace function and string =  
e.g.
<xsl:value-of select="aspdnsf:StrReplace(string, '&nbsp;', '')" disable-output-escaping="yes"/>
Sunday, December 22, 2013
Windows Server 2012 and 2012 R2 Internet Download Speed Slow
On a fresh installation of Windows Server 2012 or 2012 R2 and latest LAN drivers, internet download speeds and browsing are very very slow.
Solution:
Run the following in the cmd window:
netsh interface tcp set global ecncapability = disabled
Saturday, September 14, 2013
Magento Add Block DIV Wrapper/Container Using Template
Problem:
How to wrap block html in a div wrapper/container (and set class name) using a template file (e.g. local.xml).
Solution:
e.g. wrap a div wrapper/container around the standard Magento newsletter subscribe block.
<block type="page/html_wrapper" name="subscribe.container" translate="label">
<label>Subscribe Container</label>
<action method="setElementClass"><value>subscribe-container</value></action>
<block type="newsletter/subscribe" name="newsletter" after="leftMenu" template="newsletter/subscribe.phtml"/>
</block>
Tuesday, April 30, 2013
Magento Allow Style/Script/HTML5 Tags in CMS Pages
Magento Enterprise version 1.14.0.1
Problem:
The Magento rich text editor tinymce removes style, script, and html5 tags when CMS pages, static block etc. are saved.
Solution:
Warning – requires a source code change and is NOT upgrade friendly.
- Edit file \js\mage\adminhtml\wysiwyg\tiny_mce\setup.js
- Find the section starting with: var settings = {
- Add a new parameter e.g. paste the following code (to allow style, script, html5 tags) after the line: theme_advanced_resizing : true,
extended_valid_elements : 'style,script,section,article,aside',
Note that the tinymce version number can be found in this file: \js\tiny_mce\tiny_mce_src.js
Magento Community version 1.7.0.2
Problem:
The Magento rich text editor tinymce removes style tags when CMS pages, static block etc. are saved.
Solution:
Warning – requires a source code change and is NOT upgrade friendly.
- Edit file \js\mage\adminhtml\wysiwyg\tiny_mce\setup.js
- Find the section starting with: var settings = {
- Add a new parameter e.g. paste the following code (to allow style tags) after the line: theme_advanced_resizing : true,
valid_children : '+body[style]',
And to allow both style and script tags:
valid_children : '+body[style|script]',
Note that the tinymce version number can be found in this file: \js\tiny_mce\tiny_mce_src.js