# Changing Mautic title

**URL:** <https://forum.mautic.org/t/changing-mautic-title/3501>\
**Category:** Development\
**Created:** [April 12, 2016, 11:58pm UTC](https://forum.mautic.org/t/changing-mautic-title/3501 "2016-04-12T23:58:27Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris76](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/chris76/32/522_2.png) [@Chris76](https://forum.mautic.org/u/Chris76)\
**Post date:** [April 12, 2016, 11:58pm UTC](https://forum.mautic.org/t/changing-mautic-title/3501/1 "2016-04-12T23:58:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Chris76](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/chris76/32/522_2.png) [@Chris76](https://forum.mautic.org/u/Chris76)\
**Post date:** [April 12, 2016, 11:58pm UTC](https://forum.mautic.org/t/changing-mautic-title/3501/2 "2016-04-12T23:58:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ninjoan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ninjoan/32/1005_2.png) [@ninjoan](https://forum.mautic.org/u/ninjoan)\
**Post date:** [April 13, 2016, 11:58am UTC](https://forum.mautic.org/t/changing-mautic-title/3501/3 "2016-04-13T11:58:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ninjoan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ninjoan/32/1005_2.png) [@ninjoan](https://forum.mautic.org/u/ninjoan)\
**Post date:** [April 13, 2016, 8:58pm UTC](https://forum.mautic.org/t/changing-mautic-title/3501/4 "2016-04-13T20:58:27Z")

</div>

@Chris76 yes delete the cache.

---

<div class="post-metadata">

**Author:** ![Chris76](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/chris76/32/522_2.png) [@Chris76](https://forum.mautic.org/u/Chris76)\
**Post date:** [April 14, 2016, 2:53am UTC](https://forum.mautic.org/t/changing-mautic-title/3501/5 "2016-04-14T02:53:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Chris76](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/chris76/32/522_2.png) [@Chris76](https://forum.mautic.org/u/Chris76)\
**Post date:** [April 16, 2016, 2:51am UTC](https://forum.mautic.org/t/changing-mautic-title/3501/6 "2016-04-16T02:51:34Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![nickt](https://avatars.discourse-cdn.com/v4/letter/n/ce7236/32.png) [@nickt](https://forum.mautic.org/u/nickt)\
**Post date:** [June 10, 2016, 8:56pm UTC](https://forum.mautic.org/t/changing-mautic-title/3501/7 "2016-06-10T20:56:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![nickt](https://avatars.discourse-cdn.com/v4/letter/n/ce7236/32.png) [@nickt](https://forum.mautic.org/u/nickt)\
**Post date:** [June 10, 2016, 9:33pm UTC](https://forum.mautic.org/t/changing-mautic-title/3501/8 "2016-06-10T21:33:56Z")

</div>

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):

```auto
document.title=title;
```

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

---

<div class="post-metadata">

**Author:** ![andres.bautista](https://avatars.discourse-cdn.com/v4/letter/a/eb8c5e/32.png) [@andres.bautista](https://forum.mautic.org/u/andres.bautista)\
**Post date:** [July 25, 2016, 6:43pm UTC](https://forum.mautic.org/t/changing-mautic-title/3501/9 "2016-07-25T18:43:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![youyang](https://avatars.discourse-cdn.com/v4/letter/y/4491bb/32.png) [@youyang](https://forum.mautic.org/u/youyang)\
**Post date:** [July 26, 2016, 6:21am UTC](https://forum.mautic.org/t/changing-mautic-title/3501/10 "2016-07-26T06:21:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![loanatik](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/loanatik/32/1923_2.png) [@loanatik](https://forum.mautic.org/u/loanatik)\
**Post date:** [July 27, 2016, 10:15am UTC](https://forum.mautic.org/t/changing-mautic-title/3501/11 "2016-07-27T10:15:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![youyang](https://avatars.discourse-cdn.com/v4/letter/y/4491bb/32.png) [@youyang](https://forum.mautic.org/u/youyang)\
**Post date:** [July 28, 2016, 2:13am UTC](https://forum.mautic.org/t/changing-mautic-title/3501/12 "2016-07-28T02:13:35Z")

</div>

> [@13697:@loanatik](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![andres.bautista](https://avatars.discourse-cdn.com/v4/letter/a/eb8c5e/32.png) [@andres.bautista](https://forum.mautic.org/u/andres.bautista)\
**Post date:** [August 2, 2016, 7:08pm UTC](https://forum.mautic.org/t/changing-mautic-title/3501/13 "2016-08-02T19:08:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [August 3, 2016, 7:41am UTC](https://forum.mautic.org/t/changing-mautic-title/3501/14 "2016-08-03T07:41:40Z")

</div>

Hi everyone!

For the record, check [https://github.com/mautic/mautic/pull/2134](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.

---

<div class="post-metadata">

**Author:** ![MadScientist](https://avatars.discourse-cdn.com/v4/letter/m/f19dbf/32.png) [@MadScientist](https://forum.mautic.org/u/MadScientist)\
**Post date:** [October 24, 2016, 10:04pm UTC](https://forum.mautic.org/t/changing-mautic-title/3501/15 "2016-10-24T22:04:22Z")

</div>

DOESN’T WORK. ADMINS ARE BEING EXTREMELY LAZY

---

<div class="post-metadata">

**Author:** ![sperb](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/sperb/32/144_2.png) [@sperb](https://forum.mautic.org/u/sperb)\
**Post date:** [December 16, 2016, 5:03pm UTC](https://forum.mautic.org/t/changing-mautic-title/3501/16 "2016-12-16T17:03:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![A\_Ram](https://avatars.discourse-cdn.com/v4/letter/a/e68b1a/32.png) [@A\_Ram](https://forum.mautic.org/u/A_Ram)\
**Post date:** [December 19, 2016, 6:30am UTC](https://forum.mautic.org/t/changing-mautic-title/3501/17 "2016-12-19T06:30:03Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![namratasaun](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/namratasaun/32/2801_2.png) [@namratasaun](https://forum.mautic.org/u/namratasaun)\
**Post date:** [January 9, 2021, 4:31pm UTC](https://forum.mautic.org/t/changing-mautic-title/3501/18 "2021-01-09T16:31:58Z")

</div>

if you can’t find generatepagetitle() function. It’s in app.js

---

<div class="post-metadata">

**Author:** ![allweather](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/allweather/32/11325_2.png) [@allweather](https://forum.mautic.org/u/allweather)\
**Post date:** [February 17, 2024, 6:51pm UTC](https://forum.mautic.org/t/changing-mautic-title/3501/19 "2024-02-17T18:51:25Z")

</div>

I cant find this line in mautic 5.0.3. Do you have any idea where I could locate it?

---

<div class="post-metadata">

**Author:** ![allweather](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/allweather/32/11325_2.png) [@allweather](https://forum.mautic.org/u/allweather)\
**Post date:** [February 17, 2024, 6:53pm UTC](https://forum.mautic.org/t/changing-mautic-title/3501/20 "2024-02-17T18:53:44Z")

</div>

Im using Mautic 5.0.3 and the mautic title keeps coming back after I refresh the page. please assist

[Next page](https://forum.mautic.org/t/changing-mautic-title/3501.md?page=2)
