Martinus Posted October 16, 2022 Posted October 16, 2022 Does someone know if you can view more columns in admin? Now in Admin all I have is page names.
taotoo Posted October 16, 2022 Posted October 16, 2022 You can add more fields to display by editing the templates for the relevant pages, clicking the Advanced tab, scrolling down to "List of fields to display in the admin Page List", then entering multiple fields such as {title} {a_field} {another_field}. You can also mix in other text, such as {title} | {a_field} > {another_field}.
Martinus Posted October 16, 2022 Author Posted October 16, 2022 Hi thanks for the reply. Is it also possible to have this in a table format? Because when I add fields to display I end up with one long line of text.
taotoo Posted October 16, 2022 Posted October 16, 2022 Not that I know of, though maybe it's possible to create a module to do this. You could instead consider using Lister. If you go to Pages > Find, you could save various searches as bookmarks, then add shortcuts to those bookmarks which would be used instead of the Page Tree. You can have different columns for each bookmarked search.
bernhard Posted October 17, 2022 Posted October 17, 2022 You can use the new getPageListLabel() method of custom page classes to mimic a table-like list: <?php namespace ProcessWire; // placed in /site/classes/BasicPagePage.php class BasicPagePage extends Page { public function getPageListLabel() { return "<span style='display:inline-block;width:200px;outline:1px solid black;'>{$this->id}</span><span style='display:inline-block;width:300px;outline:1px solid black;'>{$this->path}</span>"; } } Brilliant new feature ? 3
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now