Jump to content

Change title tag in the admin


microcipcip
 Share

Recommended Posts

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

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);
}

 

  • Like 5
Link to comment
Share on other sites

  • 6 years later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...