css and javascript directories
Posted: 26 June 2008 12:22 PM   [ Ignore ]  
Summer Student
Total Posts:  11
Joined  02-03-2008

I’ve got a quick question regarding my css and js files. What is the best way to keep these files?

Should I create a template group for each or create a sub-folder under my root for example css and link to it like {site_url}css/sreen.css.

Thanks for the help

Profile
 
 
Posted: 26 June 2008 02:37 PM   [ Ignore ]   [ # 1 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  339
Joined  02-28-2008

It makes no difference as long as they are external.

Profile
 
 
Posted: 26 June 2008 04:38 PM   [ Ignore ]   [ # 2 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1516
Joined  01-05-2007

I like to create templates with a template group called external. In there I create my css, javascript and XML files. Then I can edit them via the EE template edit screen.

I keep all my libraries in a folder alongside the System folder so I can easily access anything with ”/assets/javascript/jquery.js” for example.

 Signature 

 
Steven Hambleton | ExpressionEngine Development for Web & Graphic Design Agencies

Profile
 
 
Posted: 26 June 2008 05:52 PM   [ Ignore ]   [ # 3 ]  
Summer Student
Total Posts:  11
Joined  02-03-2008

I’m not sure I understand what you mean by “along side your System Folder” Is that the same as creating sub-folders outside of EE?

Profile
 
 
Posted: 26 June 2008 05:57 PM   [ Ignore ]   [ # 4 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1516
Joined  01-05-2007

Yes. So a typical folder structure is -

System
Images
Themes
etc

I put my Assets folder alongside these so it’s -

System
Assets
Images
Themes

You could everything in the themes folder if you wanted but I create everything in static HTML first and I use an assets folder for all static sites so I can simply copy and paste the CSS across into EE without changing any folder structures.

 Signature 

 
Steven Hambleton | ExpressionEngine Development for Web & Graphic Design Agencies

Profile
 
 
Posted: 26 June 2008 06:04 PM   [ Ignore ]   [ # 5 ]  
Summer Student
Total Posts:  11
Joined  02-03-2008

Thank you, that helps

Profile
 
 
Posted: 27 June 2008 04:20 AM   [ Ignore ]   [ # 6 ]  
Summer Student
Total Posts:  22
Joined  06-23-2008

I use an ‘assets’ directory as well, where I store my css, javascript, xml and any other…well..assets. smile

It’s funny when you find out other developers use the same site structure/coding conventions - nice to know I’m doing it right (or I’m not the only one doing it wrong).

Profile
 
 
Posted: 27 June 2008 06:17 AM   [ Ignore ]   [ # 7 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1516
Joined  01-05-2007
jacksonhyde - 27 June 2008 04:20 AM

I use an ‘assets’ directory as well, where I storte my css, javascript, xml and any other…well..assets. smile

It’s funny when you find out other developers use the same site structure/coding conventions - nice to know I’m doing it right (or I’m not the only one doing it wrong).

Great minds and all that smile

 Signature 

 
Steven Hambleton | ExpressionEngine Development for Web & Graphic Design Agencies

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 10:33 AM
Total Registered Members: 62450 Total Logged-in Users: 29
Total Topics: 76733 Total Anonymous Users: 17
Total Replies: 414518 Total Guests: 598
Total Posts: 491251    
Members ( View Memberlist )