NorbertH Posted November 16, 2018 Share Posted November 16, 2018 I am looking for a way to add a full pagetree to select the path to redirect users to. It would enable us to redirect to FE pages too , and possibly to the profile page.... Does anybody know how to replace the standard selector whith a full pagetree to select a page in that module ? Link to comment Share on other sites More sharing options...
gmclelland Posted November 16, 2018 Share Posted November 16, 2018 Not sure, I fully understand you. In your page field change the input to "Page List Select." Link to comment Share on other sites More sharing options...
DL7 Posted November 27, 2019 Share Posted November 27, 2019 Hi all, As I want to make full use of all the features build standard in the Admin, I'm currently creating a custom dashboard for user so they can add and edit pages. These user may only acces their own created pages and of course add new once using 1 restricted template. For this I use Admin Restrict Page Tree module. This is working as expected, page tree and page tab is not visible. But I found a bug which I cant seem to solve: As said the user has the ability to add a page. On this add page, the breadcrumbs are shown. If a user would click, it will open the page tree on /admin/page/list/. This should also be not visible, but it still is. I cant seem to restrict this page. Same goes also for the admin/page/add/ (showing all the parent page, while the user should only be to see the one page I offer him to edit.) - this one is more difficult and I could except if this was not possible. Any pointers would help! Link to comment Share on other sites More sharing options...
monchu Posted November 28, 2019 Share Posted November 28, 2019 To hide breadcrumb, I used this hook in ready.php $this->addHookBefore('Process::breadcrumb', function(HookEvent $event) { $Process = $event->object; $Process->wire('breadcrumbs')->removeAll(); }); 1 1 Link to comment Share on other sites More sharing options...
adrian Posted November 29, 2019 Share Posted November 29, 2019 You can also modify breadcrumbs as needed, eg: https://github.com/adrianbj/AdminRestrictBranch/blob/4964a3f5b83338f7313f7c6daeefe6c6793640b0/AdminRestrictBranch.module.php#L131-L144 Link to comment Share on other sites More sharing options...
DL7 Posted November 29, 2019 Share Posted November 29, 2019 20 hours ago, monchu said: To hide breadcrumb, I used this hook in ready.php $this->addHookBefore('Process::breadcrumb', function(HookEvent $event) { $Process = $event->object; $Process->wire('breadcrumbs')->removeAll(); }); Thanks! So this works for all pages except: /your-admin/page/add/ . Somehow this page is using a different "breadcrumb". Any ideas? @monchu @adrian Link to comment Share on other sites More sharing options...
teppo Posted December 5, 2019 Share Posted December 5, 2019 Hey @DL7, just a quick heads-up: I've merged your questions into the support thread for the Admin Restrict Page Tree. The modules/plugins area of the forum is intended for module-specific support threads (one per module), and you can find the correct thread via the modules directory. Link to comment Share on other sites More sharing options...
DL7 Posted December 9, 2019 Share Posted December 9, 2019 @teppo Thanks! I only cant find that thread. Via the module page, this board is linked. Could you let me know where to find the correct board? I did some investigation and found out that the AdminUIkit uses a different way (or at least code) to populate the breadcrumb. For that reason the standard way to remove them doesn't work. To be able to manipulate the output, I used a hook. $this->addHookAfter('AdminThemeUikit::renderBreadcrumbs', function(HookEvent $event) { // Get the object the event occurred on, if needed $AdminThemeUikit = $event->object; // Populate back return value, if you have modified it $event->return = $return; }); Link to comment Share on other sites More sharing options...
teppo Posted December 9, 2019 Share Posted December 9, 2019 4 hours ago, DL7 said: @teppo Thanks! I only cant find that thread. Via the module page, this board is linked. Could you let me know where to find the correct board? I merged your question to the correct thread earlier, so yes – this is it ? Link to comment Share on other sites More sharing options...
TomPich Posted May 12 Share Posted May 12 Hey there, I had the same need (hide page tree for certain roles). Used https://processwire.com/modules/admin-restrict-page-tree/ module. Worked like a charm, except that I had the same problem than @DL7, i.e. the bread crumbs provide links to the page tree. The page tree is not displayed, but a page saying "Login" with an "Edit profile" button is shown. That may be a bit confusing for users. So I add a few lines to the module, in order to optionnaly skip the bredcrumbs rendering (a hook, and a checkbox to choose whether you want to display the page tree for restricted users). It works well with AdminThemeUikit (I didn’t test it with the default admin theme). I thought this might be useful to other users. @Wanze, @netcarver if you want to have a look at it, maybe for module update? It would be my first contribution to a PW module... ? 3 Link to comment Share on other sites More sharing options...
netcarver Posted May 12 Share Posted May 12 Hello @TomPich I'd be delighted to receive a PR against the module - or just open an issue to discuss your modifications. This is a very old module now, so it probably could do with a fresh update. 1 Link to comment Share on other sites More sharing options...
TomPich Posted May 12 Share Posted May 12 Very old indeed, but still useful... and still working ? Who said plugins needed to be updated every week ? Oups... wrong forum... ? I’ll open an issue on Github. 2 1 1 Link to comment Share on other sites More sharing options...
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