Welcome Guest, Not a member yet? Register   Sign In
How to load selective JS and CSS in individual views
#1

[eluser]jaswinder_rana[/eluser]
Hi:

I have a view where I want to put a JS slideshow. I found a good one which uses MooTools and other files.

However, I only need it in one view. My views selectively load header and footer.
Code:
&lt;?php echo $this->load->view('header');?&gt; //Includes from &lt;html&gt; to <div> OPENING content tag
BODY
&lt;?php echo $this->load->view('footer');?&gt;from CLOSTING </div> content tag to &lt;/html&gt;

Now I may have misunderstood but I am assuming that all those &lt;head&gt; tags etc. should be views.

I could probably set an optional $tags variable and in my header check for it's existence. If it exists then output it.

As for the value of that tag, I can just supply the &lt;link&gt; and [removed] tag.

Am I doing this the wrong way?

Is there another way to do it in CI which I missed in the manual? Or something obvious which I am missing?

Thanks


Messages In This Thread
How to load selective JS and CSS in individual views - by El Forum - 01-03-2009, 05:08 PM
How to load selective JS and CSS in individual views - by El Forum - 01-04-2009, 12:33 AM
How to load selective JS and CSS in individual views - by El Forum - 01-04-2009, 01:24 AM
How to load selective JS and CSS in individual views - by El Forum - 01-04-2009, 02:56 AM
How to load selective JS and CSS in individual views - by El Forum - 01-04-2009, 11:06 AM
How to load selective JS and CSS in individual views - by El Forum - 01-04-2009, 11:09 AM
How to load selective JS and CSS in individual views - by El Forum - 01-04-2009, 11:15 AM
How to load selective JS and CSS in individual views - by El Forum - 01-04-2009, 11:17 AM
How to load selective JS and CSS in individual views - by El Forum - 01-04-2009, 01:37 PM



Theme © iAndrew 2016 - Forum software by © MyBB