Jump to content

Customize admin page


Marco Ro
 Share

Recommended Posts

Hi guys,

I'm would like to customizing the admin page to make it very simple for a customer. But I can't find where I can edit some part of the page.

These are the parts I can't find:

  • I would like to position the edit button differently and customize the row, like add a imagine before the title of the page.

   364471421_Schermata2020-01-22alle17_11_57.thumb.png.2824025a067f65410813f507a21c61e4.png

 

  • I would like edit the table by add photo and others info

    135947807_Schermata2020-01-22alle17_13_50.thumb.png.eb7d9acfa0d21d04e168efc775f12f7d.png

 

  • I would also like to be able to add a specific page in the left menu that shows me on the right the children of that page.
    Example: under the heading pages add Blog and in the left pages the list of articles.


At the moment I have seen that inside wire/modules/AdminTheme/AdminThemeDefault I can modify the general page but I don't know where to take the other elements.

Can tell me please if it is possible to do this and on which pages can I go to work?

Thank you so much!

Link to comment
Share on other sites

I can't answer all of your questions right now, but you should never edit any file in the wire-folder. It will be overwritten the next time you upgrade PW.

With admin themes, you can simply copy the entire admin-theme folder from wire/modules/AdminTheme/AdminThemeDefault to site/modules/AdminTheme/AdminThemeDefault. PW will notice there are two versions of the same module and ask you which one it should use. Just select the site/... version and then you can work with the copy. (I think that applies to any kind of module - not just admin themes)

re: your first use-case / question
There's an old module out there which does something similar: Pick an image from the page and display it in the page-tree. iirc it's a module (or hook?) by @Soma; search the forums - you'll find it eventually.

 

  • Like 1
Link to comment
Share on other sites

Thank you @dragan. Absolutely yes, you're right I immediately create a copy of the theme and I'm going to work on that.

In AdminThemeDefault I just see this part that render all content, but I don't have understood where the pages are.

<?php
	$body = $page->get('body');
	if($body) echo $body;
	unset($body);
	echo $content;
	echo $extras['content'];
?>

This theme will only be a version associated with a specific user, the Editor. It would be really brilliant if I could change the content that is rendered in this part working like in the front-end. 

I check the AdminThemeDefaultHelpers and I find something, but not look like all data are in this page, or am I wrong?

 

Link to comment
Share on other sites

9 hours ago, Marco Ro said:

I immediately create a copy of the theme and I'm going to work on that

The theme itself should be the last piece you think of editing, as you will invariably detach yourself from future improvements that come with the regular updates. Almost everything can be done by using existing modules or, for very specific requirements, by extending other modules or writing your own that work within the theme (and still do when you switch to another theme).

Have a look at @Soma's Page List Image Label module as @dragan suggested.

The commercial Lister Pro module might also be worth a look. With it, you can create flexible page lists and add them to the menu for your editors. There are nice screenshots here, for example. It should be possible to add these listers to the main menu level too.

You can even build your own Process modules to extend the backend, which is quite straight forward. You can find a good introduction in the PW blog.

You can add custom fields to your User template, and the configuration (Setup -> Configuration) of ProcessUser lets you select which of those are visible in the user list.

Changing the buttons in the page tree can be done through hooks on methods in ProcessPageList and ProcessPageListActions (e.g. inside site/ready.php, which is update-safe) and, on the visual side, by adding your own custom js and css (e.g. through the Admin Custom Files module).

  • 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

  • Recently Browsing   0 members

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