Customizing Layouts

Beyond the color and layout changes possible by overriding the PowerPAC CSS classes and styles, overall layout structure for the PowerPAC header, menu options, footer, and dashboards can be customized by editing the application primary master page.

PowerPAC pages share a common ASP.NET master page called site.master which resides in the root directory. With knowledge of HTML, ASP.NET, and C#, a customized version of this file can result in changes in the layout of the header, menu options, and footer that may not be possible through CSS changes.

The site.master file can be modified in place, but be sure to make a backup of the original file. Also, be aware that changes will be overwritten when PowerPAC is upgraded on your server. A better method is to create a custom theme and then create a copy of site.master in your custom theme folder. PowerPAC always looks for a site.master in the selected theme folder before defaulting to the version in the application's root directory.

Most of the dynamic data content for portions of PowerPAC pages that are rendered via the site.master file are contained in a C# object called PageData.

The following attributes of the PageData object are available for use in any customized PowerPAC master page:

ATTRIBUTE C# DATA TYPE DESCRIPTION

IsPatronAccountEnabled

bool

Patron account access link. Enabled - Boolean attribute indicating whether or not patron logons are allowed.

Banner.CustomBackgroundColor string Custom background color style for banner as specified in Polaris Administration
Banner.CustomForegroundColor string Custom font color style for organization name display as specified in Polaris Administration
Banner.IsShowOrganizationName bool Whether to display organization name as specified in Polaris Administration
Banner.HeaderAlignment string HTML style attribute for horizontal alignment of header display data
Branches list<> List of branch (organization) links included in drop-down list used to switch branches
Branch.URL string URL used to switch to a given branch
Branch.Label string Branch (organization) display name
ChildrensPAC.IsEnabled bool Boolean attribute indicating whether or not Children's PAC logo/link displays
ChildrensPAC.LinkUrl string HREF link to Children's PAC main page
ChildrensPAC.Label string Display text of Children's PAC link
CopyrightText string Text of copyright statement
Languages list<> List of languages that this installation of PowerPAC supports
Language.Label string Label of the specific language option link
Language.URL string URL of the specified language option link
CurrentLanguageID int

Currently selected language. Could be used to conditionally display static text in the site.master in different languages. Valid values include those licensed by the system. Possible values:

1033 - English

1042 - Korean

1045 - Polish

1049 - Russian

1065 - Farsi - Persian

1066 - Vietnamese

1081 - Hindi

1141 - Hawaiian - United States

2052 - Chinese

3082 - Spanish - Span (Modern Sort)

3084 - French - Canada

12289 - Arabic

15372 - Haitian Creole

HeaderLogo.ImageUrl string URL for image of main header
HeaderLogo.LinkUrl string HREF link for main header logo
HeaderLogo.AltText string ALT text for main header logo
OrganizationName string Name of the currently selected organization
OrganizationID int ID for the currently selected organization. Could be used to key off of to conditionally display static text for specific organizations.
PageID int Web page ID for the page, typically used to determine which dashboards to display. Could also be used to key off of for any additional page-specific content.
IsPatronLoggedOn bool Boolean attribute indicating whether or not a patron is logged on
PatronName string Name of currently logged on patron
PolarisFooterLogo.ImageUrl string URL of the "Powered by Polaris" image logo
PolarisFooterLogo.AltText string ALT text for the "Powered by Polaris" image logo
MenuOptions list<> List of main menu categories and sub-options as defined in HeaderData.xml
MenuOption.ID int ID of main tab option
MenuOption.IsSelected bool Boolean indicating whether this is the currently selected option
MenuOption.Link.URL string URL for the option
MenuOption.Link.Label string Text label for the option
MenuOption.MenuSubOptions list<> List of sub-options for this main category. An empty list indicates there are no sub-options.
MenuSubOption.ID int ID of sub-option
MenuSubOption.IsSelected bool Boolean attribute indicating whether this is the currently selected sub-option
MenuSubOption.Link.URL string URL for the sub-option
MenuSubOption.Link.Label string ext label for the sub-option
MobilePAC.IsShowLink bool Boolean attribute indicating whether the link to classic Mobile PAC appears in the page footer
MobilePAC.Label string Label of classic Mobile PAC link in footer
MobilePAC.LinkUrl string URL of classic Mobile PAC link in footer
SkipToMainContentLabel string Label of the link to skip to main content of page. Typically invisible, but used by screen readers for ADA compliance.
SkipToMainMenuLabel string Label of the link to skip to main menu of page. Typically invisible, but used by screen readers for ADA compliance.
ThemePath string The web path of the images and style sheets for the currently active theme. Could be used as a prefix to any custom images contained in that directory.
VirtualReference.IsEnabled bool Boolean attribute indicating whether or not Virtual Reference is enabled
VirtualReference.LabelPre string Label text before the hyperlinked portion of the link
VirtualReference.Link.Label string Label of hyperlinked portion of the link.
VirtualReference.Link.URL string URL of hyperlinked position of the link
VirtualReference.LabelPost string Label text before the hyperlinked portion of the link

Section- and Page-Specific Customizations

For PowerPAC pages that inherit from site.master, the BODY HTML tag contains two classes that may be used as selectors for scoping of section- and page-specific CSS customizations. The page-specific class is of the format page-{pagename} in which {pagename} is the name of the ASPX page minus the .aspx file extension. The section-specific class is of the format section-{sectionname} where {sectionname} is the directory in which the page resides.

Example:

For the page /polaris/patronaccount/itemsout.aspx, the BODY tag would include the following classes:

<BODY class=”section-patronaccount page-itemsout”>

Navigation Menu Options

Navigation menu options are defined in the file HeaderData.xml in the root of the PowerPAC folder. If a single customized HeaderData.xml file will suffice for all branches, copy the HeaderData.xml file to the /custom/ folder and customize the copied file. Polaris looks first for HeaderData.xml in the /custom/ folder; if the file is not found there, Polaris uses the HeaderData.xml file in the root of the PowerPAC folder.

If you need different custom HeaderData.xml files for various branches, you can create them in the /custom/ folder, and each can be assigned to one or more branches:

Perform a PowerPAC reload or IISRESET after creating the HeaderDataIndex.xml file. Polaris Hosted customers should contact Polaris Customer Support to perform an IIS reset.

Menu Classes for PAC Usage Statistics

Library administrators who analyze PAC usage statistics using a third-party analytics tool can gather data regarding usage of menus in the header. To enable the usage statistics, an individual class identifies each menu and sub-menu option in the headerdata.xml file.

Note:
The class is not for the following menus: More, Language, and Branches.

The class name format is as follows: menu-[menuID]-[submenuID]

Example:

These classes also allow for CSS style customization of individual menu options and sub-options.