Highlight home page in the panel sidebar

Maybe you have “Producs and services” in your home title. It’s possible to rename it in the panel sidebar to “Home”.

config.php

c::set('panel.stylesheet', 'assets/css/panel.css');

panel.css

[data-text^="(link: home "] span {
	visibility: hidden;
}

[data-text^="(link: home "] span:after {
	content: 'Home';
	visibility: visible;
	position: absolute;
	left: 1.75em;
}

Why wouldn’t you use the Title field of the page to that effect?

Title: Home
Pagetitle: Products and Services

You can hide it in the blueprint if needed. Seems cleaner no?

Why not simply use a home icon for that page?

I think your CSS solution might be potentially confusing for the user, and to me seems pretty hacky, anyway.

// home.yml
title: Home
pages: false
files: true
icon: home
fields:
  title:
    label: Title
    type:  text

https://getkirby.com/docs/panel/blueprints/page-settings#set-custom-icon

4 Likes

Then we have 3 solutions! :slight_smile:

In then end I went for the @texnixe solution. It’s less hacky and another way of showing which page is home.