Skip to content

Mobile: HTML Head Regions

Rob Knight edited this page Jan 11, 2018 · 1 revision

An explanation of HTML <head> region assignments.

1. UNIFORM HTML HEAD

This is assigned at the template-level. It should not be altered. This region contains the assets and information requires at the GLOBAL level for all UC Santa Cruz web pages.

2. LOCAL HTML HEAD

This region should contain assets required at the SITE level. For instance, if a site uses a special stylesheet for some reason, you would include a link to that stylesheet in this region, at the configuration set level.

3. PAGE HTML HEAD

This region should contain assets for this particular page-type. For instance, if this is a Gallery Page, include Fancybox scripts and CSS. This should be assigned at the configuration set level, but use global blocks. [See note]

4. CUSTOM HTML HEAD

This region is for assigning assets at the page-level. Perhaps this particular page needs some custom code in the <head>. You can assign a code block to this region and it will load inside of the HTML head. Use this region sparingly and conservatively.


Note: Home page billboards and pop-up photo galleries are considered "features". I made it so we only add features to a page when they are necessary, rather than load all features on every page of every site.

To accomplish this, I have made these changes:

  1. Separated features into different blocks in _library/global/blocks/features. All of the CSS/JS needed for a particular feature are linked from one block.
  2. Assigned a chooser block to the PAGE HTML HEAD region of the pages that need one or more of these features.
  3. Assigned a format that outputs the chosen blocks into the <head> the page.