SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: Drupal doctype

  1. #1
    SitePoint Addict tlacaelelrl's Avatar
    Join Date
    Apr 2011
    Location
    Mexico city, Mexico
    Posts
    353
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Drupal doctype

    I am learning how to develop a Drupal template, have been exploring the files of the default template and have found that the doc type declaration is only found in the maintenance page so I was wondering how is the doc type added to the page when not in maintenance mode
    Do you get bothered because I do the same thing every day?
    Do you question why I do it?
    Then find something that you actually like doing!!!

    Stop thinking on what I do.

  2. #2
    SitePoint Wizard bronze trophy
    Join Date
    Oct 2001
    Location
    Vancouver BC Canada
    Posts
    2,018
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Hello tlacaelelrl,

    It depends on the version of Drupal you are using. On Drupal 6, you include all of the html document information in your page.tpl.php file. In Drupal 7 all of the document information is inherited from html.tpl.php in the core Drupal framework unless you create your own html.tpl.php.

    This method of inheritance is handy because for very basic sites your theme can consist of about 4 files and as the site gets more complex, you add what you need to override the various templates.

    I often override html.tpl.php so that I can throw in a meta tag for IE browsers to force them to display using the most recent document mode (<meta http-equiv="X-UA-Compatible" content="IE=edge" />). You can override the base template by copying the original and moving it into your theme directory.

    You can find the boilerplate html.tpl.php file in the root directory of your Drupal site at: /modules/system

    Cheers,
    Andrew
    Andrew Wasson | www.lunadesign.org
    Principal / Internet Development

  3. #3
    SitePoint Addict tlacaelelrl's Avatar
    Join Date
    Apr 2011
    Location
    Mexico city, Mexico
    Posts
    353
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thank you for the info, I will look into the html.tpl.php in the modules/system as I am using version 7
    Do you get bothered because I do the same thing every day?
    Do you question why I do it?
    Then find something that you actually like doing!!!

    Stop thinking on what I do.

  4. #4
    SitePoint Wizard bronze trophy
    Join Date
    Oct 2001
    Location
    Vancouver BC Canada
    Posts
    2,018
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Sounds good... I figured you were probably using Drupal 7.

    Have a good weekend!

    Andrew
    Andrew Wasson | www.lunadesign.org
    Principal / Internet Development


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •