Brand website and backend browser tabs with TNCSC titles and favicon
Set page-specific titles for website, login, and member portal routes while retaining dynamic titles for other pages. Replace the default favicon with the official TNCSC logo. Add TNCSC to the backend title service without losing action names or notification counters. Validated XML, title expressions, manifest entries, JavaScript syntax, and backend action/counter updates against the Odoo 19 title service. Live template rendering still requires deployment and module upgrade.
This commit is contained in:
parent
d7503347ee
commit
191b12b0cd
@ -46,6 +46,7 @@ that applies to the community_* product modules.
|
||||
'data/ir_cron.xml',
|
||||
'views/website_pages.xml',
|
||||
'views/website_header_overrides.xml',
|
||||
'views/browser_branding.xml',
|
||||
'views/event_kanban_views.xml',
|
||||
'views/community_dashboard_views.xml',
|
||||
'views/login_templates.xml',
|
||||
@ -67,6 +68,7 @@ that applies to the community_* product modules.
|
||||
'tncsc_deployment/static/src/js/event_kanban_renderer.js',
|
||||
'tncsc_deployment/static/src/js/community_dashboard.js',
|
||||
'tncsc_deployment/static/src/js/global_sidebar.js',
|
||||
'tncsc_deployment/static/src/js/browser_branding.js',
|
||||
'tncsc_deployment/static/src/xml/kanban_empty_column.xml',
|
||||
'tncsc_deployment/static/src/xml/community_dashboard.xml',
|
||||
'tncsc_deployment/static/src/xml/global_sidebar.xml',
|
||||
|
||||
11
addons/tncsc_deployment/static/src/js/browser_branding.js
Normal file
11
addons/tncsc_deployment/static/src/js/browser_branding.js
Normal file
@ -0,0 +1,11 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registry } from "@web/core/registry";
|
||||
|
||||
// Keep Odoo's action titles and notification counters, with TNCSC as the brand.
|
||||
registry.category("services").add("tncsc_browser_branding", {
|
||||
dependencies: ["title"],
|
||||
start(env, { title }) {
|
||||
title.setParts({ tncsc: "TNCSC" });
|
||||
},
|
||||
});
|
||||
39
addons/tncsc_deployment/views/browser_branding.xml
Normal file
39
addons/tncsc_deployment/views/browser_branding.xml
Normal file
@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<template id="browser_branding" inherit_id="web.layout" name="TNCSC Browser Branding">
|
||||
<xpath expr="//head/title" position="before">
|
||||
<t t-set="title" t-value="{
|
||||
'': 'Home | TNCSC',
|
||||
'/about': 'About Us | TNCSC',
|
||||
'/about/tamil-nadu': 'Tamil Nadu | TNCSC',
|
||||
'/about/board-of-directors': 'Board of Directors | TNCSC',
|
||||
'/membership': 'Membership | TNCSC',
|
||||
'/membership/benefits': 'Membership Benefits | TNCSC',
|
||||
'/membership/registration': 'Membership Registration | TNCSC',
|
||||
'/event': 'Events | TNCSC',
|
||||
'/product/tncsc-summer-picnic-2026': 'Summer Picnic 2026 | TNCSC',
|
||||
'/tamil-school': 'Tamil School | TNCSC',
|
||||
'/sponsors': 'Sponsors | TNCSC',
|
||||
'/contact': 'Contact Us | TNCSC',
|
||||
'/my': 'Member Portal | TNCSC',
|
||||
'/my/home': 'Member Portal | TNCSC',
|
||||
'/my/membership': 'My Membership | TNCSC',
|
||||
'/my/school': 'My Tamil School | TNCSC',
|
||||
'/web/login': 'Member Login | TNCSC',
|
||||
'/web/signup': 'Create Account | TNCSC',
|
||||
'/web/reset_password': 'Reset Password | TNCSC',
|
||||
}.get(request.httprequest.path.rstrip('/'), title)"/>
|
||||
</xpath>
|
||||
<xpath expr="//head/title" position="attributes">
|
||||
<attribute name="t-esc">title if title and title != 'Odoo' else 'TNCSC'</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//head/link[@rel='shortcut icon']" position="attributes">
|
||||
<attribute name="type">image/png</attribute>
|
||||
<attribute name="t-att-href">'/tncsc_deployment/static/src/img/brand/logo.png'</attribute>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<record id="website.default_website" model="website">
|
||||
<field name="favicon" type="base64" file="tncsc_deployment/static/src/img/brand/logo.png"/>
|
||||
</record>
|
||||
</odoo>
|
||||
Loading…
x
Reference in New Issue
Block a user