feat: Add generic floating shortcut tab with PIRANHA Params configuration - #81
Closed
Pince-Rioux wants to merge 5 commits into
Closed
Pince-Rioux wants to merge 5 commits into
Pince-Rioux wants to merge 5 commits into
Conversation
…tion Adds a floating shortcut tab (fixed right edge, vertical text) to the ClubSite. The tab is configured entirely through PIRANHA Manager Params, making it reusable across any purpose without code changes. Key changes: - New _FloatingRegisterTab.cshtml partial view reads 5 PIRANHA Params: shortcut-tab-enabled, shortcut-tab-link, shortcut-tab-text, shortcut-tab-color, shortcut-tab-hide-mobile - _Layout.cshtml includes the new partial after the footer - WebAppStartup.cs skips HTTPS redirect in Development environment (needed for local testing without HTTPS) The tab appears automatically when the Params are configured in Manager -> Settings -> Params. When Params are deleted, the tab disappears. Zero code changes needed per use case.
Corrected Neusäß special characters
Member
Looks like there's something missing in this PR that makes the Params visible for editing in Manager |
Adds a dedicated Piranha Manager page under Settings → Shortcut Tab to configure the floating shortcut tab. This replaces the earlier instruction to manually create Params in Manager → Settings → Params, which was not discoverable and required knowing exact key names. Changes: - New Manager page at ~/manager/settings/shortcut-tab with a form for all 5 Params (enabled, link, text, color, hide-mobile) - Menu item registered in the Settings group for discoverability - Params are created/updated/deleted via IApi.Params on save - Follows Piranha Manager UI patterns (breadcrumb, card, list-group) This addresses PR review feedback that custom Params need a proper Manager UI to be usable by site admins.
Pince-Rioux
force-pushed
the
feature/floating-shortcut-tab
branch
from
August 3, 2026 14:48
3ab55d5 to
2090fea
Compare
Contributor
Author
|
Good point — having admins hunt through the generic Params section wasn't great. I've added a proper Manager page at Settings → Shortcut Tab so the 5 Params can be configured through a form instead. |
Removes the Piranha Manager settings page and Params-based configuration in favor of a simple hardcoded tab in _FloatingRegisterTab.cshtml. The tab links to /mitglied-werden with minimal CSS, no database or configuration required.
Replaces hardcoded PDF link with dynamic lookup from Piranha media library by folder name and filename. Reads FolderName/FileName from AppSettings.json, resolves the PublicUrl via Piranha API, and caches it in-memory. - _FloatingRegisterTab.cshtml: looks up folder by name, then file by filename in Piranha_Media, caches the PublicUrl - AppSettings.json: adds FloatingRegisterTab section with FolderName and FileName - Falls back silently with error log if document not found - Full CSS positioning (no Bootstrap-only dependency) for reliable right-side fixed placement on mobile Safari
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a floating shortcut tab widget to the ClubSite PIRANHA CMS. The tab appears as a vertical button fixed to the right edge of the screen and is configurable entirely through PIRANHA Manager → Settings → Params — no code changes required per use case.
Motivation
The club needs a persistent "Mitglied werden" call-to-action visible on every page. Rather than hardcoding a specific registration page, this solution makes the tab generic so admins can repurpose it for tournaments, PDF downloads, external links, etc.
Changes
New file:
Pages/_FloatingRegisterTab.cshtmlA partial view that:
WebApp.Api.Params.GetByKeyAsync()<style>, no SCSS dependencies, no DI registrationConfigurable Params:
shortcut-tab-enabledtrueshortcut-tab-link/mitglied-werdenshortcut-tab-text🏐 Beitretenshortcut-tab-color#dc3545shortcut-tab-hide-mobilefalseModified:
Pages/_Layout.cshtml<partial name="_FloatingRegisterTab" />after the footer_CookieConsent.cshtmladdition (both partials are now included)Modified:
WebAppStartup.csAddRedirectToWwwPermanent/AddRedirectToHttpsPermanent) inif (!env.IsDevelopment())guardHow to Test
shortcut-tab-enabledto remove the tabDesign Decisions
ShortcutTabPagecustom page type, but PIRANHAs StringField deserialization proved unreliable for programmatically-inserted data. Params are simpler, have no deserialization issues, and are fully editable through the Manager UI.hide-mobileparam (appliesd-none d-sm-blockBootstrap class).