1

I am developing a site, in which my client has only access to sites/default/files path(their company allows only this path as public) today i got a new requirement that theme files such as css and js needs to be editable by admin , so they want theme files in sites/default/files/themes/site-theme. Is this achievable ? if so please give me any ideas on this .

1
  • When you say editable by admin, do you mean by a Drupal admin through the Drupal interface? If so, this sounds like a recipe for disaster. Are you using a version control workflow? Jul 28, 2011 at 11:40

1 Answer 1

1

One possible solution would be to alter the $theme_path global during hook_init(), although that would mean that all your theme files should be in another directory. I'm not sure if that's what you're going for.

If you just want to change some paths (ie for the stylesheets), alter the paths during hook_preprocess_page(), look up $vars['styles'] and change the paths there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.