Developer Questions Answered

Mouse sitting next to a laptop
  • When changing themes does the content get removed? For instance, should I do all my theme customizing before handing the site over to a client to make content changes?
  • No, the theme has nothing to do with the content. However, block placements are specific to a theme. So if someone arranges a page and then switches to a new theme those arrangements will be lost. That said, if the theme is a sub theme and it is the first time enabling the theme, it will inherit all the blocks from the parent theme on first installation.
  • While going through the local development tutorial videos it was clear why there was a need to add a key and a new repo for the theme, but what is the reason for the first "git init " command?
  • The “git init” step assumes that a sub theme repo has not yet been created. If you have already created a repo for the sub theme then you can ignore this step.
  • Once I’m happy with a new theme and its pushed to git, can I use that same theme across multiple sites?
  • Yes, you can use it as much as you like, you will just have to sync it to each site through Site Factory.
  • When copying the starter theme, the video goes through using a basic starter set. If I want to use the advanced theme do I need to do anything special to get the SASS to compile?
  • When using the Advanced Starter kit, Sass will compile with Gulp. Both the Basic and Advanced Starter kits have a README.md file which will explain how to use it. https://bitbucket.org/ietwebdev/sitefarm-theme-one-subtheme-starterkits/src/advanced/README.md states that once you have installed node, gulp, etc… you can compile with "$ gulp”. This will create a watcher to recompile your sass on each save and reload your local browser. If all you want to do is a one time compile then you can do “$ gulp compile”. Do “$ gulp help” for more commands.
  • Do I need to clear the cache to few every CSS change I make?
  • In local development you should not need to clear the cache for CSS changes. The only time in local development that you should need to clear cache is when adding PHP files, functions, classes, methods, etc. With your site on Site Factory everything is always cached so you will need to clear the cache if you make any changes.