-
Notifications
You must be signed in to change notification settings - Fork 3
Mobile: HTML Head Regions
An explanation of HTML <head>
region assignments.
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.
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.
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]
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:
- 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. - Assigned a chooser block to the
PAGE HTML HEAD
region of the pages that need one or more of these features. - Assigned a format that outputs the chosen blocks into the
<head>
the page.