Create your own Sub-theme

Intro

It is possible to 'hack' themes - changeing or adding code to the template files to make them look and behave how you would like them to. However, developing in this way creates a fork of the original theme which can no longer accept updates from the team that created it. Drupal provides us with a getaround enabling us to create our own themes based on other themes without the risks and responsibilities that come with hacking or forking existing projects.

We create a sub-theme, one that inherits all the files and properties of the original theme but can safely contain our individual overrides for style and functionality.

SFTP - Secure File Transfer Protocol

In order to create a sub theme we will need to connect with our sites files using SFTP. To do this we will need an ftp client, Filezilla may already be installed on your machine - if not you can download a copy for free here:

https:\/\/filezilla-project.org\/

Connect to Pantheon

  1. Open up Filezilla and from the file menu choose File > Site Manager

  2. Create a new site and call it My Blog - or something appropriate

  3. Set the connection protocol to SFTP and logon type to Normal

  4. Now go to your Pantheon dashboard to get your connection details from the connection info tab - you'll need to scroll to the SFTP section.

  5. Add your details in the host, username, password and port fields in Filezilla and connect to your pantheon site

  6. Now you will see the files on your server on the right and your local files on the left.

  7. Open the code folder on teh pantheon (remote) side to get to your site ROOT directory

Tasks

  • Read: Drupal Bootstrap Sub theme guide
  • Watch: How to create a Bootstrap sub-theme
  • Do: Create a subtheme for your site based on bootstrap, overide some of the CSS in your own stylesheet.
  • Do: Use an SFTP client (e.g. Filezilla) to connect to your pantheon development site and upload your local changes by transfering the files from local.

    NB. Make sure you make backups of both local and remote sites before you start transferring and migrating

results matching ""

    No results matching ""