I'm about to start a Drupal project for a client who has a large site currently set up on Drupal. The project will be a mini-site on a subdomain and will be totally different from the main website.

The mini-site will probably be a one-page website and the client wants to be able to easily edit the test on there. The one-page website will be fairly long and will need custom HTML.

My initial thought was to just code the HTML directly into a new page via Drupal and enable 'Full HTML' as the content type - my only worry is that I don't want the client to see/edit the HTML code, I only want them to be able to edit the text content.

So my question is quite simple - what would be the best way to go about doing this?

  • 2
    I don't want the client to see the HTML There's nothing you can do about that, such is the nature of the web
    – Clive
    Jan 7, 2014 at 9:05
  • If you want static HTML on a separate subdomain that has nothing to do with Drupal, why would you use Drupal to serve it? Just define a subdomain on the server, drop in your index.html and you're done - or am I missing something? Jan 7, 2014 at 9:12

1 Answer 1


What I would do is create a new content type "Specific page" (id: specificpage).

In the content type, put all the "fields" / content that your client can edit. You don't want your client to break your HTML structure, but he probably wants to edit the title, the content, the background color, etc. Define all the fields he could want to edit and create them in your content type.

Use this code to theme the "page.tpl.php" for this specific content type:

function phptemplate_preprocess_page(&$vars) {
  if (arg(0) == 'node') {
    $vars['theme_hook_suggestions'][]  = 'page__' . $vars['node']->type;

Then create a page--specificpage.tpl.php based on the original page.tpl.php, put it in your theme folder, structure your HTML content and display the fields defined by your client in the back-office.

[Edited the answer bc I did a mistake in the code and template suggestion]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.