1
votes

I am new to Drupal and I am trying to get my head around how theming works with Drupal.

I have installed the Bootstrap Drupal theme and I want to know how I can create a custom page where I can add my own HTML markup to make it as customizable as possible, how do I do this? In the file system I see a html.tpl.php and a page.tpl.php but those have markup for every page that will be created in Drupal. How do I create my own?

I have looked on the Drupal docs but things like hook menus confuse me even more.

1

1 Answers

0
votes

First, create new content type (in admin menu: Structure -> Content types -> Add content type). Customize it as you like, add fields you want. If you miss some kind of field check for module that will add new field type..

After you finish your content type make some content in it.

Then, create a template file for your content type. Check for naming conventions here: https://www.drupal.org/node/1089656 Basically, in Drupal file name determinate it's purpose. So, if "machine name" for you content type is i.e. "team" go find original node template file called "node.tpl.php" in your...or default theme, save it as "node--team.tpl.php and change it as you need. Don't forget to flush all caches every time you add/remove some template file.

File should be added to your active theme of course....inside "/sites/all/themes/your_theme/templates" dir.