Mautic Community Forums

Changing Mautic title

Hello,



I’m trying to customise the title I can see in the browser.

So far I updated the files:

app/bundles/UserBundle/Views/Security/base.html.php

app/bundles/CoreBundle/Translations/en_US/messages.ini

themes/Mauve/html/base.html.twig

app/bundles/CoreBundle/Views/Default/head.html.php



The strange thing is: If I click on any link it shows ‘Mautic’.

If I press refresh it shows my custom title.

The HTML source is correct (with my custom title) in both ways - where does the title change come from?

JS?



Thanks,

Chris

Hello,

I’m trying to customise the title I can see in the browser.
So far I updated the files:
app/bundles/UserBundle/Views/Security/base.html.php
app/bundles/CoreBundle/Translations/en_US/messages.ini
themes/Mauve/html/base.html.twig
app/bundles/CoreBundle/Views/Default/head.html.php

The strange thing is: If I click on any link it shows ‘Mautic’.
If I press refresh it shows my custom title.
The HTML source is correct (with my custom title) in both ways - where does the title change come from?
JS?

Thanks,
Chris

Maybe Cache file? try to delete the cache folder MAYBE is that the problem IM NOT SURE

@Chris76 yes delete the cache.

Yes, I delete the cache folder but as soon as I regenerates the cache folder, the problem seems to re-appear

Nope - nothing at all.
I changed them all, but on the first load of the page, Mautic appears in the title. F5 shows my custom title.
I’m still wondering - might it come from JS? Where and how do the developers generate the title, if not in the template title?

Nothing listed here seems to fix this issue. The title change in the head.html.php file (app/bundles/CoreBundle/Views/Default/head.html.php) works upon loading the page initially, but once you click on a link in the sidebar and dynamically load a module, the title updates to “Mautic,” which is not a useful title. It should change to the name of the module you click on!

Does anyone know the source of this? I can’t seem to find it in the Javascript, but I will continue looking.

This is super hacky, but I found that you can replace this in the /media/js/libraries.js file if you want to change the title (just do a search for this line):

document.title=title;

However, this is still not that useful. I want the page title to change to represent the respective page content.

I have the same problem, It always shows Mautic title after I reload the page

The problem is the History.pushState function in core.js file!

You also have to change it in media/js/app.js

Hi, everyone, do you know how to build the app.js file. I can not find the build command.

It works, you nailed =), thank you youyang, loanatik, xyzptlkFishStix

Hi everyone!

For the record, check https://github.com/mautic/mautic/pull/2134 which will be part of Mautic 2.1.0.

@youyang use the CLI command app/console mautic:assets:generate or simple delete the media/js/app.js and it will re-generate itself on page refresh.

DOESN’T WORK. ADMINS ARE BEING EXTREMELY LAZY

I don’t get it… What is the solution? Thank you!

Update title fields in following files:

app/bundles/CoreBundle/Views/Default/head.html.php
app/bundles/UserBundle/Views/Security/base.html.php
generatePageTitle() function and History.pushState in app/bundles/Corebundle/Assets/js/1.core.js

Now delete media/js/app.js file and refresh the page in browser… (Note down or take backup if you have made any other changes to app.js file)