Welcome Guest, Not a member yet? Register   Sign In
how to load the css from view
#6

[eluser]tauruss[/eluser]
As I said before, you can use link_tag() function, or just simply <link> tag in your html document with template.
But why do you want load both of them ? Maybe I understood you wrong, but you said, that you have two css files, one for admin pages, second for users pages.
You shouldn't load css, if it is not necessary. You can avoid this by passing to the view variable with proper css file, for example:
pass to view variable $css, with filename of css (user.css / admin.css) depending which one should be used,
and then in view You use link_tag()

Code:
$link = array(
          'href' => 'css/' . $css ,
          'rel' => 'stylesheet',
          'type' => 'text/css',
          'media' => 'print'
);

echo link_tag($link);


Messages In This Thread
how to load the css from view - by El Forum - 04-22-2013, 10:29 AM
how to load the css from view - by El Forum - 04-22-2013, 11:14 AM
how to load the css from view - by El Forum - 04-22-2013, 09:31 PM
how to load the css from view - by El Forum - 04-22-2013, 10:44 PM
how to load the css from view - by El Forum - 04-22-2013, 11:06 PM
how to load the css from view - by El Forum - 04-23-2013, 02:12 AM



Theme © iAndrew 2016 - Forum software by © MyBB