How to Customize the Koha Patron Account Page
Learn how to customize the Koha OPAC patron account (My Account) page using OpacMySummaryNote, OPACUserCSS, and OPACUserJS. Includes practical examples and limitations.
The Koha OPAC patron account page — the “My Account” area where patrons view checkouts, holds, fines, and personal details — can be customized through three main tools: OpacMySummaryNote, OPACUserCSS, and OPACUserJS. These let you inject content, restyle elements, and hide sections you don’t need, without touching server-side Koha files.
This guide covers what each tool does in the patron account context, with practical examples for common requests. For a full overview of Koha’s customization options, see the Koha Customization Guide.
OpacMySummaryNote
OpacMySummaryNote is a system preference that injects HTML directly above the checkout summary area on the patron account page. Find it at Administration → System Preferences → OPAC → Patrons.
It accepts any valid HTML — text, links, styled blocks, or a full <div>. The content appears for every logged-in patron on the My Summary tab, making it useful for:
- Renewal policy reminders — “Items can be renewed up to 3 times online”
- Contact information — “Questions about your account? Call us at (555) 123-4567”
- Links to library resources — a shortcut to your digital collections or ILL request form
- Desk hours — a short table of branch hours patrons frequently look for while checking their account
Example: add a contact info block
<div class="alert alert-info" style="margin-bottom: 1rem;">
<strong>Need help with your account?</strong><br>
Call us: (555) 123-4567 — Mon–Fri 9am–6pm<br>
Or email: <a href="mailto:[email protected]">[email protected]</a>
</div>
This renders above the checkout table and is immediately visible when a patron opens My Account.
If you want to add a renewal policy note specific to your library’s rules:
<p><strong>Renewal policy:</strong> Most items can be renewed twice. DVDs and new releases cannot be renewed online — please call the desk.</p>
OPACUserCSS and OPACUserJS in the Account Area
The patron account pages are part of the OPAC, so the global OPACUserCSS and OPACUserJS system preferences apply here as well. This is the primary way to restyle or hide specific elements in the account area.
Restyling or hiding elements
If you want to visually de-emphasize the fines section because your library rarely accrues them:
#account-fines {
opacity: 0.6;
}
If you want to hide the “My Lists” tab entirely from the patron account navigation:
#menu-myac a[href*="virtualshelves"] {
display: none;
}
If you want to add library contact info to the checkout page using JavaScript rather than OpacMySummaryNote (for example, to target only the checkout tab):
$(document).ready(function () {
if (window.location.href.indexOf('opac-user.pl') > -1) {
$('#checkoutst').before('<div class="alert alert-info">Renewals by phone: (555) 123-4567</div>');
}
});
Styling the tab bar
The patron account tab bar uses Bootstrap nav classes. To highlight the active tab or change tab styling:
#menu-myac .nav-pills > li.active > a {
background-color: #2e7d32;
color: #fff;
}
#menu-myac .nav-pills > li > a {
color: #2e7d32;
}
What Cannot Easily Be Changed
Some aspects of the patron account page are controlled by server-side Koha templates and XSLT, not system preferences:
- Core table structure — the columns in the checkouts and holds tables are defined in Perl/Template Toolkit server-side. You can hide columns with CSS but cannot reorder them or add new data columns without template modifications.
- Tab order — the ordering of My Summary, My Holds, My Fines, and other tabs is hard-coded in the template. Reordering requires template edits on the server.
- Login page layout — the patron login form (
opac-user.plbefore authentication) is a separate template. OpacMySummaryNote does not appear there. You can style it with OPACUserCSS but cannot restructure it with preferences alone. - The checkout table column content — data like due dates and item titles comes from Koha’s internal database query and XSLT transform. You cannot change which fields appear without server-side changes.
Practical Examples Summary
| Goal | Tool to use |
|---|---|
| Add library contact info above checkout list | OpacMySummaryNote |
| Add renewal policy notice | OpacMySummaryNote |
| Hide a tab from the account menu | OPACUserCSS |
| Restyle the tab bar colors | OPACUserCSS |
| Show a conditional message on one tab only | OPACUserJS |
| Add a link to ILL request form | OpacMySummaryNote |
| Change the login page appearance | OPACUserCSS |
| Restructure the checkouts table columns | Not possible via preferences — requires template edit |
Limitations of This Approach
The patron account page customization options in Koha are genuinely fragmented. There is no unified “patron experience” customization panel:
- OpacMySummaryNote is a single injection point — one HTML block, one location.
- OPACUserCSS and OPACUserJS apply globally across all OPAC pages. You will need conditional JavaScript (
if window.location.href includes 'opac-user') to target account pages specifically. - Class names used in CSS selectors (
.nav-pills,#checkoutst) can change between Koha versions, breaking your customizations silently. - There is no preview mode — changes made to system preferences go live immediately for all patrons.
When Koha Theme Builder™ Is the Better Option
If your library wants a patron account area that feels cohesive with the rest of your branded OPAC — consistent colors, typography, and component styling across every page — the piecemeal system preference approach requires ongoing maintenance work.
KohaSupport Theme Builder applies structured, upgrade-safe styling across the entire OPAC including the patron account area, without requiring you to maintain a growing list of CSS selector overrides. See also How to Modernize the Koha OPAC for a broader look at modernization options. For an implementation path, continue with How to Configure the Patron Account Area in Theme Builder from the Theme Builder Documentation Hub.
Frequently Asked Questions
Can I show different content to different patrons in OpacMySummaryNote? OpacMySummaryNote is global — it shows the same HTML to every logged-in patron. For patron-type-specific messages you would need JavaScript that reads the patron category from the page, or a template-level modification.
Can I add a custom field to the patron account checkout table? Not via system preferences. Adding a column requires editing the server-side Template Toolkit file for the patron account page. That is a server-level change outside the scope of preferences.
Does styling the patron account page with OPACUserCSS affect the staff interface?
No. OPACUserCSS only affects the OPAC. The staff interface (intranet) has its own CSS system preference called IntranetUserCSS.
Will my OpacMySummaryNote customizations break after a Koha upgrade? The HTML you write is stable — it is just content. The surrounding table structure may shift, so check the rendered output after any Koha upgrade and adjust if needed. CSS selectors in OPACUserCSS are more upgrade-sensitive than OpacMySummaryNote HTML.
Related Articles
- How to Use OPACUserCSS and OPACUserJS in Koha
- How to Customize the Koha OPAC Homepage
- Koha Customization Guide
- How to Configure the Patron Account Area in Theme Builder
- Theme Builder Documentation Hub
Want a Patron Account Area That Matches Your Brand?
KohaSupport Theme Builder gives your entire OPAC — including the patron account area — a consistent, professional design that holds up through Koha upgrades.
Explore Theme Builder Book a ConsultationNext Steps
More in Koha System
Was this article helpful?