Skip to Content Skip to Menu

CB Template Changer not applying custom template to logged-in /profile route

  • mjl1817
  • mjl1817
  • ONLINE
  • Posts: 51
  • Thanks: 7
  • Karma: 1
3 weeks 4 days ago #343624 by mjl1817
Environment:
  • Joomla 6
  • Community Builder 6.x
  • CB Template Changer 6.0.0
  • Gantry 5 / Helium template
What we are building: A token-driven site-wide theming system where CB Template Changer serves as the master theme controller. CSS custom properties (
Code:
--nr-*
variables) are defined in the CB Template Changer template Overrides tab, and all styling rules for CB, Gantry, Bootstrap, and third-party CB plugins read from those variables. The goal is user-selectable themes via a CB profile field, where switching themes updates the entire site appearance without touching any core files.The problem: The custom template CSS is applying correctly to every CB route EXCEPT the logged-in user's own profile page (
Code:
/profile
).Pages where the custom template IS working:
  • Public profile (
    Code:
    /profile/username
    )
  • Member list (
    Code:
    /memberlist
    )
  • Registration (
    Code:
    nosterest.com
    root)
  • Community Hubs / GroupJive categories
Page where the custom template is NOT working:
  • Logged-in profile home (
    Code:
    /profile
    )
Diagnostic evidence: We pulled the raw HTML source from the logged-in
Code:
/profile
page and searched all stylesheet hrefs. Every CB-related CSS file loading on
Code:
/profile
comes from
Code:
/components/com_comprofiler/plugin/templates/default/
— the CB core default template. Our custom template (
Code:
15a449
) does not appear anywhere in the source. No
Code:
override.css
loads at all on that route.The body class on
Code:
/profile
is:
Code:
gantry g-helium-style site com_comprofiler view-userprofile no-layout no-task dir-ltr itemid-111 outline-12
We confirmed this is
Code:
view-userprofile
— but even adding:

css
Code:
body.view-userprofile { background: yellow !important; }
directly to the Overrides tab had zero visible effect on
Code:
/profile
, confirming the override CSS is not in the render pipeline for that route.What we have already checked:
  • CB Template Changer plugin is published ✓
  • Custom template is set as Default in the Templates list ✓
  • Template User is set to Displayed (not Viewer) ✓
  • CB Configuration → User Profile → Template is set to Custom ✓
  • No Joomla cache is active ✓
  • Hard refresh confirmed ✓
The question: Why does the logged-in
Code:
/profile
route bypass CB Template Changer entirely and load from
Code:
plugin/templates/default/
regardless of settings? Is there a separate template assignment specifically for the Profile View (Home) / Canvas (Home) layout that overrides the global template setting? Is this a known behavior difference between viewing your own profile vs viewing another user's profile?Any guidance appreciated.

I wish I knew, Then we would both know.

Please Log in or Create an account to join the conversation.

  • mjl1817
  • mjl1817
  • ONLINE
  • Posts: 51
  • Thanks: 7
  • Karma: 1
3 weeks 4 days ago #343625 by mjl1817
DISREGARD — SOLVED
We were able to resolve this ourselves. Posting the solution here in case anyone else runs into the same issue.
The Problem:
CB Template Changer was applying our custom template correctly to public profile pages, registration, member list, and other CB routes — but the logged-in user's own profile home (/profile) always loaded from plugin/templates/default/ regardless of any settings we changed. Even adding body.view-userprofile { background: yellow !important; } directly to the custom template Overrides tab had zero effect on /profile, confirming the custom template was not in the render pipeline for that route at all.
What we tried that did NOT fix it:

Setting the custom template as Default in the Templates list
Changing Template User from Viewer to Displayed
Setting CB Configuration → User Profile → Template to Custom
Recompiling Gantry CSS
Clearing all caches

The actual fix:
CB Template Changer publishes a CB profile field called Profile Template (type: CB Template Changer). This field was installed but unpublished.
To fix it:

Go to CB → Field Management and find the Profile Template field published by CB Template Changer
Publish it and assign it to a tab
Go to your own profile and select your custom template from that field
Save

Once you select the template in your own profile field, CB Template Changer intercepts the /profile route for your session and serves the correct custom template including its Overrides CSS.
The key insight is that CB Template Changer works on a per-user basis via a profile field — it does not globally override the default template for the logged-in profile home view. The user must have the template selected in their own profile field for it to apply to their own /profile page. This is by design and is actually the feature — it enables per-user theme selection — but it means the field must be published and a value must be selected for each user.
For site-wide theming where all users get the same template, you would need to set a default value on the Profile Template field so it pre-selects the custom template for all users automatically.

I wish I knew, Then we would both know.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum