Search This Blog

Mind freaker Stuff

Please Visit my new blog http://www.mindfreakerstuff.com for new articles related to web and mobile designing.

Friday, June 17, 2011

IE 6 ,7 8 CSS hacks

body {
 color: red; /* all browsers, of course */
 color : green\9; /* IE8 and below */
 *color : yellow; /* IE7 and below */
 _color : orange; /* IE6 */
}


Conditional comments of IE

<p><!--[if IE]>
According to the conditional comment this is Internet Explorer<br />
<![endif]-->
<!--[if IE 5]>
According to the conditional comment this is Internet Explorer 5<br />
<![endif]-->
<!--[if IE 5.0]>
According to the conditional comment this is Internet Explorer 5.0<br />
<![endif]-->
<!--[if IE 5.5]>
According to the conditional comment this is Internet Explorer 5.5<br />
<![endif]-->
<!--[if IE 6]>
According to the conditional comment this is Internet Explorer 6<br />
<![endif]-->
<!--[if IE 7]>
According to the conditional comment this is Internet Explorer 7<br />
<![endif]-->
</p>

Taking your detection further

Operators is what CC relies on to determine it course of action. We saw above how one operator, "!", is used to negate the browser version to detect. In fact CC supports a handful of other operators, which we shall list and then explain:
Operators supported by CC
Operator syntax Description
! The "not" operator.
lt The "less than" operator.
lte The "less than or equal to" operator.
gt The "greater than" operator.
gte The "greater than or equal to" operator
With the above operators more generic detection of browsers such as IE6+ (which encompasses IE6, IE6.1, IE7, and so on) becomes possible. For example:
<!--[if gte IE 6]>
You are using IE 6+
<![endif]-->

Thursday, June 16, 2011

Remove ,Modify ( Reorder ) or Add external Link to Top links Magento

ADD External Link ---

Where are the files for the links located

app\design\frontend\default\your_Theme\layout 

  • The “My Account” link is found in the customer.xml file
  • The “My Wishlist” link is found in the wishlist.xml file
  • The “My Cart” and “Checkout” links are both found in the checkout.xml file
  • The “Login” and “Log Out” links are found in the customer.xml file

You will find the links in between <reference name="top.links"> linking code is in here.. </reference>.
 
---------------------------------------------------------------------- 
 
<reference name="top.links">
    <action method="addLink" translate="label title">
        <label>example</label>
        <url>http://myotherexampledomain.com</url> 
        <title>example</title>
        <prepare/>
        <urlParams/> 
        <position>100</position>
        <liParams/>
        <aParams>class="top-link-example"</aParams>
        <beforeText></beforeText>
        <afterText></afterText>
    </action>
</reference>
 
--------------------- Tested on Magento 1.5 ------------------ 
Basically, prepare needs to be unset because, if it is set to "true" or
 "false", it will append the URL to your site's base URL. 
(<prepare>true</prepare>)  To append URL 
  
 
 
 
Reordering Top links  ----
 
Change or add position to links reference 
 
<reference name="top.links">
    <action method="addLink" translate="label title">
        <label>example</label>
        <url>http://myotherexampledomain.com</url> 
        <title>example</title>
        <prepare/>
        <urlParams/> 
        <position>100</position>
        <liParams/>
        <aParams>class="top-link-example"</aParams>
        <beforeText></beforeText>
        <afterText></afterText>
    </action>
</reference>  
 

Adding A Home link To the Top Links

You can add a link to your homepage by pasting in the code below in to your customer.xml file in the same place as above:
<action method="addLink" translate="label title" module="customer">
     <label>Home</label>
     <url></url>
     <title>Home</title>
     <prepare>true</prepare>
     <urlParams/>
     <position>1</position>
</action>

Adding To The Top Links On Certain Pages Only

The examples so far have added the links to all the pages, if you wanted to add, say for instance, the “Shipping Terms” link only to your “My Cart” page you would paste the following code in your checkout.xml file:
<reference name="top.links">
     <action method="addLink" translate="label title">
          <label>Shipping Terms</label>
          <url>shipping</url>
          <title>Shipping Terms</title>
         <prepare>true</prepare>
         <urlParams helper="core/url/getHomeUrl"/>
          <position>2</position>
     </action>
</reference>