| |

Drupal 9 - easy tip to identify which website you are administering.

Editorial Staff

If like me you often have two or more website admin panels open simultaneously, perhaps even in the same browser window, all using the same theme (most likely "Seven") it's easy to get confused.

There's a very simple trick to help avoid confusion.

Yes, the name of the site is in the title bar bar but sometimes you can't see the full name.

So here's how I solved it.

Administration > Structure > Block Layout >your admin theme

In the "Header" section, choose "Place Block" > Add Custom Block > Basic Block.

Type a block name (this is what the computer will recognise; it's not the human name) and then, in the "body" box type

[Your site name]

Choose ALL HTML as the text format.

Save.

This being Drupal 9, "save" doesn't always mean "completed" and this is one of those cases where it doesn't.

You'll go to a page saying "Basic block [ ] has been created. "

Decide whether you want the name of the block to show. Probably not but it's up to you.

Now you have to add the name of the block again (it need not, actually, be the same as before) or you could add a token for the site name but that seems like hard work at this stage.

Then, even though you told it to Place the Block in the header at the start, you need to confirm that using a selection box. So do that under region.

One more thing: it's tempting to think about whether to select any of the content types or pages. Don't.

When you click "Save Block" this time it will place it.

But it will place it at the bottom of the list of things you have in the header area so use the slider to boost it to the top of the list and save again.

And there you are. Do that on every site you work on, and the name of the site will appear in big print at the top of every administration page but not in the body of the site.

hahagotcha