Jump to content

Show page name under page title


AndZyk
 Share

Recommended Posts

Hello,

when you add a page you can see the page name of the page under the page title field. But when you change the page title afterwards, you have to go to the settings tab to also change the page name.

We have many clients that change the page title afterwards but forget to change the page name, because they don't look in the settings tab or forget it.

Is it possible to show the page name on the content tab under the page title?

I hate to say this, but I like how WordPress handles this better:

permalink.png.16590b8519b0357bb80773bbe79529eb.png

Or should I open an GitHub request?

Regards, Andreas

  • Like 1
Link to comment
Share on other sites

Yes, it's possible.

Set $config->advanced = true; on your config file and a "System" tab will appear while editing the template. And there you can make the change. See screenshot.

image.thumb.png.f04e2d8da2f1d9571aaa72316749441c.png

 

Similar thread:

 

 

 

Edited by Sergio
Added link to old thread.
  • Like 3
Link to comment
Share on other sites

@Sergio Thank you for the hint. ?

This solution is ok, but I don't like, that the page name is now before the page title and takes up so much space.

A smaller page name edit field under the page title (like the WordPress one) or a quick link to the field in the settings tab would in my opinion be nicer.

I know that ProcessWire doesn't want to clutter up the back-end and that is a reason why I love it and I know that I could add a note in the page title field or a hook for changing the page name on every save.

But I think in this case, showing the page name under the page title would be better then hiding it under the settings tab. Maybe @ryan could consider this wish. ?

Regards, Andreas

  • Like 1
Link to comment
Share on other sites

4 minutes ago, AndZyk said:

This solution is ok, but I don't like, that the page name is now before the page title and takes up so much space.

Yes, is not the best solution from a UX point-of-view. But I don't think that adding it below the title, as WP does, is the best way around. In most cases, we don't want the user to edit the page name by mistake. In your situation, I would take a look at @adrian's PageRenameOptions module https://modules.processwire.com/modules/page-rename-options/.

Another option is to add a warning, using a hook, if the page title is edited to alert the user to also change, or check, the page name on the Settings tab. 

  • Like 3
Link to comment
Share on other sites

Thanks for pointing to that module @Sergio - I use it on every site. It would be hard enough for me to remember to change the page name to match a new title, let alone expecting a client to do it. Given that PW has the core Page Path History functionality, I rarely see the need to not change the name when the title changes.

  • Like 5
Link to comment
Share on other sites

4 hours ago, AndZyk said:

Is it possible to show the page name on the content tab under the page title?

 

You could do it with a quick JS/CSS hack: (after you did the advanced mode stuff described above)

let lis = document.querySelectorAll('#ProcessPageEditContent > ul.Inputfields > li.Inputfield');
lis.forEach(function(li, index) {
	li.style="order:" + index;
});
document.querySelector('#wrap_Inputfield__pw_page_name').style="order: 2";

(only tested with Chrome + AdminThemUIKit)

  • Like 2
Link to comment
Share on other sites

6 hours ago, adrian said:

I use it on every site

Me too, it's an essential module.

I hesitate to say "should be in the core" because I know the PW philosophy on such things. But I wonder if certain modules that are widely needed and used could be highlighted somewhere within the core. So for instance there could be a link to PageRenameOptions from the PagePathHistory module config, so that when you install that module you get a heads-up that there is a useful related third-party module that you might want to consider also.

  • Like 1
Link to comment
Share on other sites

And what about a multilanguage site?

In general I think the easiest solution would be to display the page name and a link below the title that links to the Content tab. In case of a multilanguage site, display the current language name only. 

  • Like 1
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

×
×
  • Create New...