Welcome Guest, Not a member yet? Register   Sign In
Where to place jquery or any other globally used JS/CSS in a multi site scenario?
#4

[eluser]Devon Lambert[/eluser]
[quote author="n0xie" date="1265576733"]Could symlinking be an option?[/quote]

This may be a viable option but I would need for it to happen automatically every time a new site was created. I can read up on it and see if it works.

[quote author="Jake Grice" date="1265579388"]Usually with MVC wouldn't you have one main view file that is your site's template? This is where you include your CSS and everything. Also include jQuery! That's what I do on http://www.digitalsuccessgroup.net

I have one main view called 'main.' Then content is loaded into it by loading $this->load->view('content/somepage', '', true); into a var like $data['content'], which is passed into the 'main' view.[/quote]

The issue here is that I have separate sites, all are making use of Carabiner. Carabiner provides great options for setting up assets, even on the fly, but it gets a little tricky when I want to set a central location for re-purposed code. Templating is in place, but each site makes use of a separate theme, and thus a separate "Main" file, although in my template scenario I call it a "Layout", but the important part to note is that I would only be able to point that Layout at one location. Then of course I have a cache folder to worry about as well.

It's worth noting that this isn't a world ending scenario. I can easily store the files in a chosen site's asset folder and then link to them that way, via a url, but I was hoping for something more seamless.

All in all, I don't want to update code in various locations as well. It's the point of MVC right? Or at least of RAD and DRY.

In any event, thanks for all the help folks, you've given me some great food for thought. :-)


Messages In This Thread
Where to place jquery or any other globally used JS/CSS in a multi site scenario? - by El Forum - 02-07-2010, 01:13 PM



Theme © iAndrew 2016 - Forum software by © MyBB