microcipcip Posted October 25, 2016 Share Posted October 25, 2016 Hi, I am a new ProcessWire adept, coming from MODx Evolution (I see several of us here :)) I would like to know if it is possible to change the <title> tag in the admin to always show "ProcessWire" at the end. So for example instead of this: <title>Edit Page: Home • localhost</title> I would like to see this: <title>Edit Page: Home • localhost • ProcessWire</title> I need this because I target the title of the page with AutoHotkey so I can use shortcuts inside ProcessWire ;p Link to comment Share on other sites More sharing options...
Robin S Posted October 26, 2016 Share Posted October 26, 2016 To avoid editing core admin themes you could use the Admin Custom Files module and append to the document title with jQuery: $(document).prop('title', $(document).prop('title') + ' • ProcessWire'); Link to comment Share on other sites More sharing options...
microcipcip Posted October 26, 2016 Author Share Posted October 26, 2016 This will do, thanks a lot! Link to comment Share on other sites More sharing options...
arjen Posted October 26, 2016 Share Posted October 26, 2016 You could also use a hook. $this->addHookAfter('ProcessPageEdit::execute', function(HookEvent $event) { // Get page being editted $page = $event->object->getPage(); // Only use on pages with the product template if ($page->template != 'product') return; // Set the title & you also have access to all $page fields $title = "New title"; // Overwrite the processBrowserTitle $this->wire('processBrowserTitle', $title); } 5 Link to comment Share on other sites More sharing options...
microcipcip Posted October 27, 2016 Author Share Posted October 27, 2016 @arjen Thanks! Where do I add the hook, in the admin.php template it is not working....also, is it possible to apply it to every processWire admin page and not just in the edit page? Link to comment Share on other sites More sharing options...
fbg13 Posted October 28, 2016 Share Posted October 28, 2016 @microcipcip https://processwire.com/blog/posts/processwire-2.6.7-core-updates-and-more/#new-core-files-for-site-hooks 1 Link to comment Share on other sites More sharing options...
kongondo Posted October 28, 2016 Share Posted October 28, 2016 Hey, @microcipcip, welcome to ProcessWire and the forums. I seem to recall that handle Link to comment Share on other sites More sharing options...
microcipcip Posted October 29, 2016 Author Share Posted October 29, 2016 @fbg13 ok, I'll have a look!@kongondo thanks :), I surely remember the invaluable Wayfinder snippet, I am eager to test the Menu Builder 1 Link to comment Share on other sites More sharing options...
bernhard Posted April 26, 2023 Share Posted April 26, 2023 I've just created a PR to make the backend title easily changeable: $admintheme->browserTitle = "My custom browser title"; Please give it a thumbs up: https://github.com/processwire/processwire/pull/269 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now