Yii Framework Forum: Additional parameter for "registerCssFile" - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Additional parameter for "registerCssFile" What about adding a condition parameter Rate Topic: -----

#1 User is offline   mintao 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 62
  • Joined: 02-December 09
  • Location:Munich, Germany

Posted 05 February 2010 - 06:37 PM

Ofter you need to add a browser specific css - e.g. for our friend, the IE6. So I was looking for a "conditional" parameter.

instead of:
`public void registerCssFile(string $url, string $media='')`

I'd request a third parameter:
`public void registerCssFile(string $url, string $media='', string $condition='')`

so this:
Yii::app()->clientScript->registerCssFile('/css/ie.css', 'screen, projection', 'lt IE 8');



would produce this:

<!--[if lt IE 8]>
    <link rel="stylesheet" type="text/css" href="/css/ie.css" media="screen, projection" />
<![endif]-->

1

#2 User is offline   heyhoo 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 25-January 10

Posted 22 February 2010 - 03:04 PM

Good idea! I was searching for this option as well. At this moment it seems not possible to use registerCssFile for a browser specific css and sometimes you just need that. May I suggest to add this third parameter to the registerScriptFile function as well.
1

#3 User is offline   choiceerp 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 18
  • Joined: 24-April 10
  • Location:EUROPA - France - Paris

Posted 16 May 2010 - 05:22 PM

Very good, I need it
I'm very impatient that future will be integrated in the yii distrib
knowledge is valid only if it is shared ;-)
0

#4 User is offline   Eric Lund 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 29-November 10

Posted 14 January 2011 - 05:10 PM

This is just what I was looking for. I'd love to see this in Yii.
0

#5 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 2,680
  • Joined: 17-January 09
  • Location:Russia

Posted 15 January 2011 - 06:17 PM

http://code.google.c.../detail?id=1240
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users