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 .

  • 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? – Chris Pliakas Jul 28 '11 at 11:40
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, privacy policy and cookie policy

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