Jump to content

Show template name beside page name in Admin


Manaus
 Share

Recommended Posts

Hello, is there any plugin to show the template assigned to some page, as navigating the pages tree?

Usually I have to go to pages details, then settings, I'd like to skip that..

Thanks

Link to comment
Share on other sites

Try adding

title template.name

in a template's Advanced tab, under "List of fields to display in the admin Page List. Not sure if it works with 2.7.2.

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

  • 3 months later...
  • 5 years later...

I wanted to refresh this, cause meanwhile the new name of module is »Page List«.
Modules --> Core --> Page List --> {title} | {template.name}

page list.jpg

 

But recently I noticed, that adding an icon to a template removes the template name. And now I have two questions:

  • Is there a way to show both?
  • Is there a way to hide the template names for non admins?

 

page_list_icons.jpg

Link to comment
Share on other sites

@neophron you could to set your settings here

Setup > Templates > your-template > Advanced >  List of fields to display in the admin Page List

And maybe you look into a css solution to hide it for non-superusers. But I don't know if that is possible 

 

  • Thanks 1
Link to comment
Share on other sites

8 minutes ago, ngrmm said:

@neophron you could to set your settings here

Setup > Templates > your-template > Advanced >  List of fields to display in the admin Page List

And maybe you look into a css solution to hide it for non-superusers. But I don't know if that is possible 

 

Thanks for this hint. PW offers really a lot modifications.

This is part of the html backend structure, seen from a non admin:

<div class="PageListItem PageListTemplate_video PageListNoChildren PageListID1226 PageListStatusUnpublished secondary PageListStatusHidden PageListItemHover" data-numtotal="0" data-numchild="0">
  <a href="#" title="/video-container/video-03/" class="PageListPage label">
    <i class="icon fa fa-fw fa-video-camera"></i>
    Video 03 | video
  </a>
  ...
  
</div>

 It would be cool, if {template.name} could be wrapped in a display: not span, that is loaded only if a user is logged in. 

Link to comment
Share on other sites

2 hours ago, neophron said:

Is there a way to show both?

Sure. Either install RockMigrations and use the "PageListShowTemplate" tweak. Or have a look what it does and add a hook yourself: https://github.com/baumrock/RockMigrations/blob/main/tweaks/PageListShowTemplate.php

Or use custom page classes and use the getPageListLabel method. Also super easy!

 

  • Thanks 1
Link to comment
Share on other sites

10 minutes ago, bernhard said:

Sure. Either install RockMigrations and use the "PageListShowTemplate" tweak. Or have a look what it does and add a hook yourself: https://github.com/baumrock/RockMigrations/blob/main/tweaks/PageListShowTemplate.php

Or use custom page classes and use the getPageListLabel method. Also super easy!

 

Servus,
thanks, I'm going to check it out.

Link to comment
Share on other sites

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...