Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-24-2008, 09:02 PM
Junior Member
 
Join Date: Jun 2008
Posts: 2
Thumbs up How to handle modules with css/images?

curious what has been the best approach when a module has it's own set of JS/CSS files?

If I use a standard ZF framework setup with

Code:
/myApp/
     /application/
     /library
     /webroot
and I have my modules in the application directory and the webroot directory is the doc root for apache. Where is the best place to put css/js files for the modules? I'd like to have all inclusive modules that contain their own js/css dirs.

so each module would be set up

Code:
/application
        /modules/
              /module1/ 
                   /controllers
                   /css
                   /controllers
                   /js
                   /models
                   /views

thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-24-2008, 09:19 PM
Member
 
Join Date: Jun 2008
Location: Florida
Posts: 76
Default

If you put the css, javascript, and images outside the webroot you'll need a special handler to get their content. For example, I dont' think you can do
Code:
<link href="pathToCssFile.css" rel="stylesheet" type="text/css" />
where pathToCssFile.css is outside the webroot.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-09-2008, 11:53 PM
Junior Member
 
Join Date: Jun 2008
Posts: 2
Default

bump
bump
bump
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 07-16-2008, 09:01 PM
dele454's Avatar
Member
 
Join Date: Jun 2008
Posts: 40
Default

The easiest way that has worked for me is to have your css/js/img files in your webroot - and they should be there because they are meant for pulic viewing. You can simply create a 'module_name' folder in your webroot to house your public files

-apps
--cms(module)
-webroot
--cms(module_public_files)
---css
---js
---img

Just for simplicity and then your URL will be ../cms/css/whatever_file
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 09:36 AM.