Hi,

I'm new to drupal 7 theming, I'm creating my own them from scratch, but based on a static css template I mad for a website.
I created theme.info, page.tpl.php, block.tpl.php, etc..
But when displaying the site, I see that drupal generate lot of html headers (such as , imports, JQuery, etc), and I don't need anything of this.

How can I custom the html headers, and all the page template, to display only the things I want ?

Regards,

Comments

dman’s picture

First rule of working with computers:
If you don't know exactly what it does - don't delete it.
Second rule:
If it's not getting in the way - don't delete it.

There are standard steps you can take to simplify the embed code - enable js and css aggregation in performance settings and there will only be a few links there.

But if you just napalm things because you don't like the look of them, then a lot of normal built-in things will break. Drupals autocomplete, AJAX, form behaviors. Most add-on modules that adds functionality will be crippled. Basic layout helpers for views, for blocks - for any part of any Drupal theme.

If you find specific css styles that conflict with what you want to do, then just override them using CSS rules.

But don't just delete things, or two out of three of any bit of Drupal functionality will not work as expected.

jaypan’s picture

Fully agree. The only thing I would add is that all the HTML in the head was done that way for a reason - generally improving page loading performance. It may not be the way you are used to seeing things, but that doesn't mean it's bad.

Contact me to contract me for D7 -> D10/11 migrations.

julien’s picture

The only thing I would add is that all the HTML in the head was done that way for a reason - generally improving page loading performance.

I'm not too sure if adding 10 or 20 js and css includes in the head has been done to generally improving page loading performance.

jaypan’s picture

When you turn on javascript aggregation, it becomes a moot point anyways, as all the stylesheets are included using <link/>

Contact me to contract me for D7 -> D10/11 migrations.

julien’s picture

Ok. i misunderstood that you were talking about performance improvement and javascript aggregation. But 3/4 for me it always create javascript conflict by the way. But out of the box, drupal has a lot of css include and js include and that's why i didn't understood that it has been done for performance.