Template name in panel page and panel sidebar as data attribute

Template name in the panel

To show the template name in a panel page I need to have this in the blueprint:

    type: info
    text: >
      **Template:** home

I think it’s a little bit strange that the template name is no where to be found if not setting it up like this. Instead I would like it to be like this:

title: Home
pages: home
template: true
   somefield: somevalue

If template is true, show it somewhere, in the sidebar for example.

Template name as a data attribute

Sometimes it can be good to hide a child page template in the sidebar pages list. If the template name would exist as a data attribute in the sidebar, that would be possible through the panel css.

The more correct option would probably be “Hide this page on the parent child page list in the sidebar” but adding a data attribute would make the development process faster.

FYI: On the develop branch you see the template name in the sidebar already. It’s part of the template changer.

1 Like

If you set the template option to "true, that is:

  preview: false
  url: false
  template: true
  delete: false

And you can, of course, only change the template, if the subpage is allowed to have different templates.

1 Like

@distantnative @texnixe


I just tried it on the development branch. Those options are awesome! It completely fixes the first suggestion, to show the template name in the sidebar.

Show template, but prevent edit template - Not possible

To show the template name, but prevent users from changing that template seems not possible at the moment (in the sidebar).

Hide page from parent sidebar page list - Not possible

This suggestion remains. No data attribute or class indicate what template is used in the sidebar. There seems to be no other way to hide a page from the page list by the template name.

Missing in the docs

@distantnative I expect it to pop up in the docs instantly, but where is it? Where?? I’m pressing CTRL + R like crazy over here. :wink:

Anyway, good job and thanks for feedbacking my suggestions!

1 Like

It won’t before it got released :wink:

1 Like