Parastream™ PagePorter™

Working with Themes

Themes are a convenient way to apply text styles, colors, and graphics to a web site. You can access the Themes dialog box by selecting Site Settings from the PagePorter menu and then choosing the Themes tab.

You have access to all of the Microsoft FrontPage themes, private themes, downloaded themes, and PagePorter themes from PagePorter. You may apply any theme to the entire site, or an individual web page.

PagePorter does not provide a way to create or edit themes. For this you will need either FrontPage or a third-party application.

How Themes Work

Each web page in a theme-enabled site contains a stylesheet link preceeded by a <!--mstheme--> comment tag, followed by <meta name="Microsoft Theme" content="(themename), default"> in the header section. (themename) is the theme name, and the "default" part is included unless the page's theme has overridden the site's default theme. You don't normally have to worry about these, since FrontPage and PagePorter manage these items for you. The stylesheet link points to a CSS file that is generated by FrontPage or PagePorter, and is used by the client browser to render the pages in the proper styles.

Web controls that understand themes, such as FpLinkBar, need the theme information that is more easily accessed by code. The FpPage class has a property called MsTheme which holds the name of the theme being used on the page. When you create a new project, the default theme is set in the BasePage.MsTheme property. If an individual page has a theme override, it is set in the page's MsTheme property. If you wish to override a page's theme as "no theme," you set the page's MsTheme property to "none". All of this is managed for you by PagePorter.

The snag comes in when you change the default theme for the project. Since you can create any arbitrary page class hierarchy you want, PagePorter has no way to know where the page base classes are. This is why you have to change the MsTheme property in the base class(es) manually. See the Changing the Default Theme topic for more information.

See Also

Getting Started | Themes, Site Settings Dialog Box | Changing the Default Theme