FP Techniques >
Using Global Elements
There are 3 techniques
for handling elements that appear on multiple pages.
Use the include
page component for complex elements that occur
within pages. Use shared
borders for elements that occur on the top, bottom,
left, or right of pages. Use variables
for short text elements that occur within the body copy
of pages.
Include
Page Component
The advertisement under the vertical nav bar
that occurs on every page of this site is an include
page component. I can edit this element on one
page, and the changes go site wide as soon as I save.
I use the Include Page Component because this item
occurs within a table template, and I want it's
positioning to be precise on every page.
To use the Include
Page Component:
Create a new page with
the element you want to include on multiple pages.
I prefer to place include pages in a new folder that I
call "_includes." Don't worry if
your include page is a nav bar that may occur on pages
in different folders. The component is smart
enough to know the correct paths to the correct pages
no matter where it occurs in the Web.
- Open one of the pages
that is to use the Include Page Component.
- Position the cursor
where you want the element to go.
- On the top menu,
choose
Insert/FrontPage Component/Include Page/OK/Browse.
- Browse to your
include page.
- Click OK.
Unfortunately,
FrontPage98 inserts paragraph tags around the include
component. You can remove these if you need to by
placing your cursor above the include element and
hitting the backspace key.
Back to
top
Shared
Borders
The top banner and the bottom nav bar, book
search banner, and contact info elements of this site
are Shared Borders. I can enable Shared Borders
for an entire site so that the top and/or the left side
and/or the right side and/or the bottom of each page
will display the contents of a hidden file called
"_borders."
I don't find the side
borders useful, but the bottom border should be used on
practically all sites because basic contact information
is something that every Web page should have.
Shared Borders enable you to add this kind of thing at
any time during or even after the development process.
To enable the bottom
shared border for your site:
- In FrontPage
Explorer, choose Tools/Shared Borders.
- Check the bottom
border checkbox.
- Click OK.
Disabling
Shared Borders on Pages
A bottom border will now be visible on each page of
your site. There may some pages on which you want
to disable Shared Borders.
To disable Shared
Borders for a page:
- Open the page in
FrontPage Editor.
- Choose Tools/Shared
Borders/Set for this page only.
- Uncheck the borders
you wish to disable for the page.
Hidden
Directories
The Shared Borders pages occur in a hidden folder.
You can edit Shared Borders pages in FP Editor when you
have any borders enabled page open. There may be
times, however, when you prefer to work with the actual
border page. Hidden folders have names that begin
with a "_."
- To make hidden
folders visible:
- In Explorer, choose
Tools/Web Settings/Advanced.
- Check the "show
documents in hidden directories" box.
- Click OK.
Back to
top
Variables
If you have any kind of common textual information that
you want to display on more than one page on your site,
create a variable for it. Variables act as
placeholders--when it comes time to change the
information, all you need to do is modify the
associated variable and FrontPage automatically updates
every instance of that variable, saving you the
headache of performing the same task over and over
again.
Suppose you want to
include your company's phone number on multiple pages
in your site (or even multiple locations on a single
page) and make it easy to edit in the future. Simply
select Tools/Web Settings in FrontPage Explorer, click
the Parameters tab, and then the Add button. In the
Name field, type Company Phone. In the Value
field, enter your phone number. Click OK twice, and
your variable is set.
Now open the FrontPage
Editor by double-clicking the pages in your Web that
you want to include your company's phone number. Move
the cursor to the location in which you'd like the
number to appear, and then select Insert/FrontPage
Component. Now choose the Substitution component and
click OK. From the drop-down list that appears, select
your Company Phone variable and click OK.
Your company's phone
number will appear on the page and take on any
formatting characteristics you have set for that area.
Now, if your area code or entire phone number changes,
you can simply go back to the Web Settings dialog box
and type in a new value for the Company Phone variable.
FrontPage automatically updates all occurrences of that
variable.
Back to
top