by IWR Consultancy

The page <head> section

We have mentioned that the <head> section of Hyperframe's output to the browser is taken from the frame <head> section, with a few page-specific modifications. Nevertheless it is useful to have a <head> section in pages inasmuch as this allows you to exercise control over certain aspects of page rendering.

A default  <head> section might be:

<html>
<head>
   <TITLE></TITLE>
   <META NAME="description"  CONTENT="">
   <META NAME="keywords" CONTENT="">
</head>

Followed by...
<body>
<h1>This will be used as a title, if none is found in the head section</h1>
<p>This will be used as a description, if no title is found in the head section</p>
</body>
</html>

In fact, there is no requirement for discrete head or body sections to exist in a Hyperframe document. Though, if the document contains <!doctype>, <html>, <head> and/or <body> tags, these must follow correct HTML syntax rules.

A custom page <head> section might contain:

<head>
   <TITLE>The page head section</TITLE>
   <META NAME="description"  CONTENT="A typical head section, for a Hyperframe page">
   <META NAME="keywords" CONTENT="hyperframe !cms, head, meta tags, editing controls, section hiding">
   <META NAME="hf_doctype" CONTENT="HTML4T">  
   <META NAME="hf_frame" CONTENT="wide_frame">
   <META NAME="hf_menu" CONTENT="top">
   <META NAME="hf_hide" CONTENT="left">
   <META NAME="hf_editlevel" CONTENT="3">
   <META NAME="hf_editors" CONTENT="admin,jsmith">
</head>

Editing the head section

From Hyperframe v2.5 on, you can edit the head section of a page online, provided you have page source editing permissions. Log on and activate the online editor. In the editor toolbar, click the top-right button, labelled 'Edit HTML Source.' Pages with a head section will show a two-pane editing window, the upper for page head, the lower for content. If only a single editjng pane is present, the page does not have a head section. Currently, head sections can only be added at page creation from new, or by manually editing an existing page.

After making your changes, click Write Back, or Write & Quit to return to the live page editor. Note that the changes you have made to the head section are not committed to disk until you you save the page. (Bottom left editor toolbar button, or File..Save on the Hyperbar)

It is also worth mentioning that you cannot remove a head section from a file by deleting all content in the source editor. In that case, the head section will be unaltered. 

Titles

Although the title seen in the browser topbar is seldom even noticed by site visitors, it is important in that it is used in bookmarks, and by many searchengines, along with either the first paragraph or the description tag, as the listing entry. Thus, Hyperframe includes code to ensure, as far as possible, that these items are not left out, or unsuitable for use as page listings. 

The title attribute in the page head is used if it is present. If a title is present, the description meta content is also used. If no title is present, then a search is made of the document for the first <Hn> heading tag. This is used as a title. The description is then taken from the first identifiable paragraph in the document. In most cases this results in acceptable titles and descriptions without the need to tediously modify the head sections on a page-by-page basis. In a few cases the automatic search cannot return meaningful text, so in those cases you should enter a title and description manually.

An extremely common webmaster mistake is to reuse a page as a template for a new one on an entirely different subject, but forget to change the title tag. This can have amusing consequences in the search listings! Possibly not so amusing for the professional if the client spots it first, though. Therefore, in Hyperframe the best policy is to leave the title and description meta tags blank, and allow the system to 'use its judgement' in selecting page text for these items. Occasionally this may result in less-than-ideal listings, but in the vast majority of cases the results are good, and the avoidance of titling mistakes is very worthwhile.

Keywords

It is debatable as to which, if any, search engines use keywords for page ranking these days. However, as good practice any keywords you include in the meta tag should occur somewhere in the page body. If they do not, this may result in a demotion of the page's ranking. Thus, Hyperframe does not carry over the keywords from the frame, as these words may not be present in individual pages. An idea for future development is that of a keyword pool, from which keywords which are relevant to site promotion AND which are present in a given page will be added to the meta tag for that page. This addition  is not however regarded as a priority since it seems that keywords are not greatly relevant to page ranking these days.

Special metas

hf_doctype -allows pages to use a specific document type, overriding the frame's settting.
Useful if you need to import a few legacy pages that don't display well in HTML5. See the frame description for values.
Be aware that this changes the tags inserted by CKEditor as well as the page rendering.

hf_frame -allows pages to use a specific frame. The name is that of the frame directory, without slashes. This only affects the current page.

hf_menu - side is the default. top transforms the quicklink menu into a full dropdown list. Mainly for use on pages without a sidebar.

hf_hide - hides specific areas of the page. banner,top,left,content,right,bottom are the section names. all denotes all except content.

hf_editlevel - Determines the minimum privelege level required to edit this page online. Value 1-5. Default is 1 (all logged-in users.)

hf_editors - A comma-separated list of users who are allowed to edit this page regardless of privelege level. If no hf_editlevel is set, only admins or members of this list can edit the page. If set, hf_editlevel determines the privelege level needed by an nonlisted user.

Other items

IMPORTANT: Stylesheet and javascript code or links placed in the head section will be ignored. You must place these in the page body, or frame head. Such links may however be added to the page head purely for the sake of static page testing outside of Hyperframe.  Any doctype, character-set declaration or author/generator info will likewise only apply to static testing of the page. As previously mentioned, Hyperframe presently only allows a single document type and character-set per website. Page-specific character-sets could be added if the need is seen to exist.

 

Powered by Hyperframe