[Inso Home Page] [Home] [Collection] [Book] [Expand] [Collapse] [Search Forms] [Previous Section with Hits] [Next Section with Hits] [Clear Search] [Preferences] [Print] [Help]

 inside  Expand Search


   Template-Controlled Text   [Table of Contents]    Buttons

DynaWeb Publishers Guide

[-] 5. Modifying The DynaWeb Interface
[-] Frames

Frames

When you change the attributes of the frames, you are changing the actual HTML that is served by the server module. There are three places inside the configuration files where frame information is provided to the browser. In order to change frame attributes, make certain that you change the information in each of the three templates. Otherwise, when the unchanged templates are called, the server module will suddenly revert to the old behavior.

Moving the Button Bar

To Top Of Browser Window

To shift the button bar from the bottom of the browser window to the top, modify the following templates: dwTemplate Frames__RootView (in rootview.dwc), dwTemplate Frames__CollectionView (in collview.dwc), and dwTemplate Frames__BookView (in bookview.dwc) by searching for the template name in the correct .dwc file and modifying the portion of the template that follows.

<FRAMESET ROWS="*,100">
   <FRAMESET COLS="55%,*">
     [...]
   </FRAMESET>
   <FRAME NAME="dynaweb_bbar" SRC="@Generic__RootButtonBarView$[dwGet UrlParamString]$[dwGet UrlQueryString]" SCROLLING=no> </FRAMESET>

Next, move the line which starts "<FRAME NAME="dynaweb_bbar"... " to the spot directly beneath the "FRAMESET ROWS" line.

Next, change the "FRAMESET ROWS..." values from "*,100" to "100,*" When you finish, the template should look like this:

<FRAMESET ROWS="10,*">
   <FRAME NAME="dynaweb_bbar" SRC="Generic__RootButtonBarView$[dwGet UrlParamString]$[dwGet UrlQueryString]" SCROLLING=no>
   <FRAMESET COLS="55%,*">
     [...]
   </FRAMESET>
   </FRAMESET>

Switching the TOC and Content Frames

To switch the TOC and Content frames, modify the following templates: dwTemplate Frames__RootView (in rootview.dwc), dwTemplate Frames__CollectionView (in collview.dwc), and dwTemplate Frames__BookView (in bookview.dwc) by searching for the above name in the correct .dwc file and modifying the portion of the template that follows each section.

Switching From Left To Right

To shift the TOC so it appears on the left side of the browser window, modify the following lines:

<FRAMESET ROWS="*,100">
  <FRAMESET COLS="55%,*">
    <FRAME NAME = "dynaweb_toc"
           SRC  = "[...]">
    <FRAME NAME = "dynaweb_content"
           SRC  = "[...]">
  </FRAMESET>
  [...]
</FRAMESET>
  1. Move the "FRAME NAME="dynaweb_content" " tag directly above the "FRAME NAME="dynaweb_toc" " line.

    Remember to move the "SRC" lines along with the "FRAME" line.

  2. Modify the "FRAMESET COLS..." line to read:
    <FRAMESET COLS="*,55%">

    Reverse the values that were originally set in the original COLS line, specifically 55% and *..

    The finished changes should look like this:

    <FRAMESET ROWS="*,10">
      <FRAMESET COLS="*%,55%">
        <FRAME NAME = "dynaweb_content"
               SRC  = "[...]">
        <FRAME NAME = "dynaweb_toc"
               SRC  = "[...]">
      </FRAMESET>
      [...]
    </FRAMESET>

    Switching To Top/Bottom Orientation

    To place the TOC on top of the Content frame, modify the following lines:

    <FRAMESET ROWS="*,100">
      <FRAMESET COLS="55%,*">
        <FRAME NAME = "dynaweb_toc"
               SRC  = "[...]">
        <FRAME NAME = "dynaweb_content"
               SRC  = "[...]">
      </FRAMESET>
      [...]
    </FRAMESET>
    1. Move the two "FRAME NAME=..." lines directly beneath the "FRAMESET ROWS..." line.
    2. Modify the "FRAMESET ROWS..." line to read:
      <FRAMESET ROWS="55%,*,100">

      Whatever value was originally set in the original ROWS line (i.e. 100)should be kept. To put the button bar at the top, the line should look like this:

      <FRAMESET ROWS="100,55%,*">
    3. Delete the "<FRAMESET COLS...>" line and its corresponding ending tag completely.

      The finished changes should look like this:

      <FRAMESET ROWS="55%,*,100">
        <FRAME NAME = "dynaweb_toc"
               SRC  = "[...]">
        <FRAME NAME = "dynaweb_content"
               SRC  = "[...]">
        <FRAME NAME = "dynaweb_bbar"
               SRC  = "[...]">
      </FRAMESET>

      Setting the Background

      To change the default background for the different screens of DynaWeb, you will need to modify the preferences settings in the pubpref.dwc configuration file. To change the background for the Content pane and the TOC pane, you must modify the setting BGColor. The relevant section of the pubpref.dwc file looks like:

      #Colors
         HitColor                     Red
         BBarColor                    Silver
         BGColor                      #FFFBF0

      Changing the BGColor parameter will change the background color for both the Content and TOC panes. You can also specify a separate background for the button bar by changing the value of BBarColor. A full list of settable parameters can be found in the Default Settings section of this chapter.

      The following instructions are provided in case you wish to override the default settings for an individual screen, for example, the TOC pane inside a book.

      Book View

      To change the background color or texture for the books available on your DynaWeb site, search in the booktext.dwc and booktoc.dwc configuration files for the string "BODY" and modify them to reflect your new settings. Change all occurrences of the BODY tag to ensure that the change is absolute.

      The entry should look something like:

      <BODY BGCOLOR=$[dwGetPref BGColor]>

      The use of dwGetPref means that the value for the background color is returned from the setting in pubpref.dwc. In order to override the setting and not allow the user to override through the Preferences Dialog, remove the text "$[dwGetPref BGColor] and replace it with the hard-coded value for the background color. For example, to make the background bright yellow, the final line would look like:

      <BODY BGCOLOR=#FFFF00>

      Note: Changing all of the templates in the bookview and booktoc configuration files will change the backgrounds of the TOC and content frames only. You will probably want to change the frame containing the button bar to reflect the new settings as well. To do this, modify the Frames__BookButtonBarTemplate and the NoFrames__BookButtonBarTemplate templates, located inside the bookbbar.dwc configuration file, to update the button bar.

      Note: If you are not sure how to add a texture or color to the BODY tag, consult an HTML reference guide.

      Collection View

      To change the backgrounds while viewing collections and their contents, change all of the BODY tags inside the colltext.dwc and colltoc.dwc configuration files. Search for all occurrences of the BODY tag and make your changes.

      The entry should look something like:

      <BODY BGCOLOR=$[dwGetPref BGColor]>

      The use of dwGetPref means that the value for the background color is returned from the setting in pubpref.dwc. In order to override the setting and not allow the user to override through the Preferences Dialog, remove the text "$[dwGetPref BGColor] and replace it with the hard-coded value for the background color. For example, to make the background bright yellow, the final line would look like:

      <BODY BGCOLOR=#FFFF00>

      Note: Changing all of the templates in the above configuration files will change the backgrounds of the TOC and content frames only. You will probably want to change the frame containing the button bar to reflect the new settings as well. To do this, modify the Frames__CollectionButtonBarView and NoFrames__CollectionButtonBarView templates inside the collbbar.dwc configuration file.

      Button Bar

      To change only the button bar background at all viewing levels, change all occurrences of the BODY tag inside the bookbbar.dwc, collbbar.dwc, and rootbbar.dwc configuration files to reflect your new settings.

      The entry should look something like:

      <BODY BGCOLOR=$[dwGetPref BGColor]>

      The use of dwGetPref means that the value for the background color is returned from the setting in pubpref.dwc. In order to override the setting and not allow the user to override through the Preferences Dialog, remove the text "$[dwGetPref BGColor] and replace it with the hard-coded value for the background color. For example, to make the background bright yellow, the final line would look like:

      <BODY BGCOLOR=#FFFF00>

      Changing a Frame's Size

      In order to change the frames for all of the views, search in the specified configuration file for the following templates:

      Root View: search for "dwTemplate Frames__RootView" in the rootview.dwc configuration file.

      Collection View: search for "dwTemplate Frames__CollectionView" in the collview.dwc configuration file.

      Book View: search for "dwTemplate Frames__BookView" in the bookview.dwc configuration file.

      The default behavior of DynaWeb's frames in the root collection template is to default to the left-hand frame taking up 55% of the browser window, while the right-hand frame takes up the remainder of the browser window. Vertically, a frame 100 pixels in height is reserved at the bottom of the browser window for the button bar, while the rest is taken up by the two frames. This is illustrated below.

      Figure 5-1: Frame Proportions

      raster

      The lines of the template that control the frame sizes are as follows:

      <FRAMESET ROWS="*,100">
        <FRAMESET COLS="55%,*">

      The COLS line controls the width of the TOC and content frame, respectively. If you want to change the relative width of the two frames to be even, change the line to:

      <FRAMESET COLS="50%,50%">

      Find the preceding lines in all three templates and change the values to your specifications. Once all three are changed, DynaWeb will always display the modified behavior.

      Note: Whenever you change something in the configuration files, you need to restart the server in order to see your changes.

      Defaulting View to No Frames

      DynaWeb automatically defaults to no frames, but if it recognizes that the client's browser can display frames, it will send frames to that browser. If you wish to never send frames, even to frame-enabled browsers, you must modify the following line, and then remove the frames/no frames button from the button bar (using the directions in the section below entitled "Removing a Button from the Button Bar".)

      Search for "Mozilla" in the procdef.dwc configuration file. You should see the following section:

      if {[string match "Mozilla*" $Agent] == 1} {
          if {MajorVer >= 2} {
              set Frames 1
          }
      ...

      Change the line that states "set Frames 1" to "set Frames 0". This will stop DynaWeb from auto-detecting frames. The changed section should look like:

      if {[string match "Mozilla*" $Agent] == 1} {
          if {MajorVer >= 2} {
              set Frames 0
          }
      ...

         Template-Controlled Text   [Table of Contents]    Buttons