Richard Jedlička Posted January 17, 2021 Posted January 17, 2021 Hi, I'm creating a custom process module with a subpages (via ___executeXXX). The problem is the module's main page uses in the breadcrumbs a module's page title but the sub pages uses a title of the module itself as a parent page in a breacrumbs, see: Modules config: public static function getModuleInfo() { return [ 'title' => 'Réva Jedlička - Kontakty', 'version' => 1, 'summary' => '', 'page' => [ 'name' => 'contacts', 'title' => 'Kontakty', ], 'requires' => [ 'Revajedlicka' ], 'installs' => [ 'RevajedlickaContactsImport' ] ]; } Breadcrumb for main page (___execute()): Breadcrumb for a subpage (___executeDetail()): What should I do to have Administrace > Kontakty > Detail there without changing the name of the module? Thanks Richard
Zeka Posted January 17, 2021 Posted January 17, 2021 Hi @Richard Jedlička You can try public function executeSome() { $this->headline('Your page'); $this->breadcrumbs->pop(); $this->breadcrumb('../', $this->_('Some page')); $this->breadcrumb($this->getProcessPage()->url(), $this->_('Some other page')); } 3
adrian Posted January 18, 2021 Posted January 18, 2021 A couple of real world examples, just in case they help in addition to @Zeka's answer. https://github.com/adrianbj/ProcessAdminActions/blob/5d77e86ae20f016d3b9ce1abd791b1af9e82451e/ProcessAdminActions.module.php#L683 https://github.com/adrianbj/AdminRestrictBranch/blob/4964a3f5b83338f7313f7c6daeefe6c6793640b0/AdminRestrictBranch.module.php#L131-L144 1
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