Contact | Privacy | Datenschutzerklärung | Impressum

Standard Layout Library

The Standard Layout Library (stdlay.hei) provides a general framework for the construction of Web Pages that maintain a consistent "look and feel". Indeed, many of the Component Libraries, particularly the Outline Library, require the services provided by Standard Layout in order to work.

You might want to think of the Standard Library as a template-driven approach to Web Page design. Here is a simple example of how that would work:

<include stdlay.hei>

<stdpage title="My first heitml Page">

This is my first heitml Page

</stdpage>

The <stdpage> Environment Tag generates all of the necessary HTML, TITLE, HEAD, and BODY Tags which are a part of every page. You can see from the above example how <stdpage> assigns a title to a page. As you read further, you will discover how <stdpage> allows you to specify other options associated with the HEAD and BODY Tags.

Standard Layout serves as a nice abbreviation to the otherwise cumbersome chore of inserting the above named Tags into the beginning and end of your pages. But Standard Layout has many more advantages:

  • You can define your own custom page layout and use it in all your pages. Graphics, Logos, copyright messages, and anything else you desire can all be incorporated into a single layout definition. This creates a consistent looking Web Site, saves a lot of typing, and drastically reduces maintenance overhead when you want to make changes. When your Web Pages are based on a layout, all you need do is change the layout definition, and every page that uses it will automatically the changes the next time it is called.
  • If you've ever been confronted with the frames/no-frames controversy, you'll be pleased to note that you no longer have to maintain two different versions of your Web Site. A Standard Layout can be designed to display your pages either way, drastically reducing your workload.
  • Pages using the Standard Layout can be included as a part of another page.
  • The Standard Layout provides a compact and simple way to retain the current state of variables from one page to another.
  • The Standard Layout smoothly integrates with Session Mode.

Using Custom Layouts

To create your own layout, first create an include file named mylay.hei and put it in a directory within the include path.

Example:

<include stdlay.hei>

<defenv stdFooting> // Define page foot here
   <p>
   <&copy by me
</defenv>
// 
// Set colors here
<stdParam bgcolor="ffffff" link="ff0000"
           alink="ff0000" vlink="c00000">

As declared above, <stdFooting> defines a footer for each Web Page, in this case a copyright message. The <stdParam> Tag defines the color scheme to be used.

To use these Tags in your pages, just include mylay.hei instead of stdlay.hei into your pages. Your pages will then use this formatting (i.e. the defined colors) and the copyright message will appear as a footer (i.e. the last thing that appears at the bottom of each page).

All the Tags you can use to customize the layout are described in detail below. They can be used within your page layout (e.g. mylay.hei) to apply for all pages using this layout, or they can be used within a single page to modify the layout for just one page.

Formatting Tags

< stdpage title > ... </stdpage>

Creates a page using the standard layout. The title must be a string specifying the document title.

< stdHeading />

Redefine this Tag to create a heading on all of your pages. Anything you define here is placed into the page just after the HTML <body> Tag, but before the normal text.

< stdFooting />

Redefine this Tag to create a page footer on all of your pages. Anything you define here is placed into the page just before the HTML </body> Tag, but after the normal text. If you want a copyright message to appear at the bottom of all your pages, this is where you would put it.

< stdParam background=null bgcolor="ffffff" text=null link=null alink=null vlink=null />

This Tag allows you to specify a background picture and color scheme for your pages. Background is the name of a background picture; bgcolor, text, link, alink, and vlink are the colors as used in the HTML <body> Tag.

The <stdParam> Tag must be used before the <stdPage> Tag. It can be used either in the custom layout include file or in the page itself. Subsequent calls to <stdParam> overwrite the values set by earlier calls, so the parameters set in the layout file can be re-defined within the page itself.

< stdNormalPage > ... </stdNormalPage>

Redefining this Tag is an alternative to redefining the <stdHeading> and <stdFooting> Tags. It is more powerful but also a bit more difficult to use. This Environment Tag defines the whole page body. The environment is called with the page body as the environment parameter.

Including Pages

Standard Layout pages can be included as the part of another page. For example, you can paste many pages together to create a single large document. This is particularly useful to obtain a print out of all pages within a related document, application, or Web Site. All you need do is write:

<include PageToInclude.hei>

somewhere in a page. Note: This works only if both pages are using the standard layout.

If a page is included, no HTML, BODY, HEAD, and TITLE Tags are generated. You can also define other Headings and Footings using the following Tags:

< stdIncHeading />

< stdIncFooting />

< stdIncPage > ... </stdIncPage>

These Tags work as their counterparts without the Frame in the name (stdHeading, stdFooting and stdNormalPage) but they are used if the page is called inside a frame.

By default, no headings and footings are displayed on included pages.

Session Mode

The stdlay.hei works well with Session Mode. You can simply include session.hei and use the <session> Environment Tag around the <stdpage> Environment Tag.

If you have not included session.hei you naturally can not access the session variables but you can still use the sa , sessionHidden , and sessionUrl tags. (See the Language Reference for a description of these Tags.) Using them keeps the Uuser within a single session (i.e. if the User klicks on another link pointing to a page with Session Mode, the old session continues).

Limited Session Mode

Pages using Standard Layout can also use Session Mode in a limited manner to handle Session Variables. This Limited Session Mode is weaker than normal Session Mode because it handles String Variables only. Data is sent to the client and back again (which causes net traffic) with each page call. However, this method may have some performance advantages over the full-blown Session Mode, and, since it does not automatically switch off proxies, can be useful in special situations.

The Limited Session Variables are named ff.s.variablename, where variablename is the name of the variable whose value you wish to preserve between pages. You can assign a string type value to such a variable. This value will then be passed through the URL to the next page.

Internally the variables are passed within the URL (i.e. the <sa> Tag appends the to the URL and the <sessionHidden> Tag generates hidden fields to pass the parameters).

In order to work properly the <sa>, <sessionHidden>, and <sessionUrl> Tags must be used to link pages. (See the Language Reference for a description of these Tags.)

Frame Mode

Normally pages have a different basic layout depending on wether they are used alone or within a frame. With the Standard Layout Libraries you can design pages that are used in a "stand alone" fashion in some parts of your Web Site, and within a frame in other parts.

< stdFrameHeading />

< stdFrameFooting />

< stdFramePage > ... </stdFramePage>

These Tags work as their counterparts without the Frame in the name (stdHeading, stdFooting and stdNormalPage) but they are used if the page is called inside a frame.

Standard Layout knows from a form parameter called ff.s.inframe whether the page is called inside a frame. The User is responsible for setting this parameter. But notice that this is a variable of the Limited Session Mode type, so it is passed on from page to page.


This page was dynamically generated by the web application development tool RADpage of H.E.I.

Selected blog articles : 3D Objects on HTML pages, CSS Transition Visibility, and CSS Transition Display.


© 1996-2022 H.E.I. All Rights Reserved.



Homepage
Intro/Features
Component Guide
Programming
  Language Guide
  Language Ref.
  Component Ref.
  Class Library
  User Components
  Tutorial
  New Features
  heitml 1
    dba Tutorial
    dbq Tutorial
    dbs Tutorial
    The heitml Libraries
      Standard Layout
      Session Libraries
      The dba Library
      Query Forms
      Scroller
      Outline Library 1
      Email Form Library
      Counter Library
      HTML Extensions 1
      Date/Time Library 1
      Math Library 1
      String Library
    Demonstration
User Guide
Services
Privacy
Datenschutz
 
Contact / Impressum