Jump to content
Richard Jedlička

Inconsistent breadcrumbs for process sub pages

Recommended Posts

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()):

image.png.cc0ce1616f143cecd46c9eaccb1e7a08.png

Breadcrumb for a subpage (___executeDetail()):

image.png.0c9dbed55f7f2169598ae105d5a4a378.png

What should I do to have Administrace > Kontakty > Detail there without changing the name of the module?

Thanks
Richard

Share this post


Link to post
Share on other sites

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'));
}

 

  • Like 3

Share this post


Link to post
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

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...