-1

In which table does Drupal 8 store the theme name?

I'm trying to programmatically install an uninstalled theme. Obviously, there's some written logic behind the Install and set as default button. What exactly does that button do?

  • What do you mean by "theme name"? – Clive Jul 11 '16 at 8:16
  • what do you mean active theme name? if true you can find it in table config with row name is system.theme. Data store is serialize. Data like that unserialize.com/s/0a62731a-cc5a-d8c8-1a76-00004200aea8 – MrD Jul 11 '16 at 8:31
  • @MrD I am pretty sure she is dealing with an uninstalled theme name. – No Sssweat Jul 11 '16 at 8:37
0

The theme names are not stored in the db; other wise, we would have to uninstall the uninstalled themes... How would Drupal know the name of an uninstalled theme? It reads the names from the themename.info.yml file.

If you think about it, its just like uninstalled module names, the module name is not stored in the db, Drupal reads/gets the name from the module.info.yml file.

  • so what, if some one wants to install any theme PRO-GRAMMATICALLY? I know how to set default theme pro-grammatically but can't figure out How to install it? – Sugandh Khanna Jul 11 '16 at 8:26
  • @SugandhKhanna that's a totally different Q than you initial Q. You should make a new Q regarding that. Off the top off my head, I don't know the answer to that since I've never had to deal with that scenario. You would have to do the programmatically equivalent of pressing the Install and set as default button. – No Sssweat Jul 11 '16 at 8:31
  • 1
    I can't think of a scenario where the ability to "install any theme PRO-GRAMMATICALLY" makes sense. @SugandhKhanna could you clarify where and when your code will ever be in a position to make use of this? What is your goal? – Clive Jul 11 '16 at 8:41
  • My goal is like: I have a info.yml file where theme name is written, that I want to install, I will read this theme name from my .info.yml file and on a single button click, that theme will get installed. That same theme itself is present in theme folder of drupal. – Sugandh Khanna Jul 11 '16 at 8:46
  • Ok...but what does that have to do with your need to find the name of a theme in the database? – Clive Jul 11 '16 at 9:08

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.