diff --git a/src/core/siteplugins/components/module-index/core-siteplugins-module-index.html b/src/core/siteplugins/components/module-index/core-siteplugins-module-index.html
index bee7dafe8..f3c8b832d 100644
--- a/src/core/siteplugins/components/module-index/core-siteplugins-module-index.html
+++ b/src/core/siteplugins/components/module-index/core-siteplugins-module-index.html
@@ -9,4 +9,4 @@
-
+
diff --git a/src/core/siteplugins/components/module-index/module-index.ts b/src/core/siteplugins/components/module-index/module-index.ts
index a9f9dfeed..586bd5203 100644
--- a/src/core/siteplugins/components/module-index/module-index.ts
+++ b/src/core/siteplugins/components/module-index/module-index.ts
@@ -32,6 +32,7 @@ import { CoreSitePluginsPluginContentComponent } from '../plugin-content/plugin-
export class CoreSitePluginsModuleIndexComponent implements OnInit, OnDestroy, CoreCourseModuleMainComponent {
@Input() module: any; // The module.
@Input() courseId: number; // Course ID the module belongs to.
+ @Input() pageTitle: string; // Current page title. It can be used by the "new-content" directives.
@ViewChild(CoreSitePluginsPluginContentComponent) content: CoreSitePluginsPluginContentComponent;
diff --git a/src/core/siteplugins/components/plugin-content/plugin-content.ts b/src/core/siteplugins/components/plugin-content/plugin-content.ts
index 57598e495..aebf88e59 100644
--- a/src/core/siteplugins/components/plugin-content/plugin-content.ts
+++ b/src/core/siteplugins/components/plugin-content/plugin-content.ts
@@ -37,6 +37,7 @@ export class CoreSitePluginsPluginContentComponent implements OnInit, DoCheck {
@Input() initResult: any; // Result of the init WS call of the handler.
@Input() data: any; // Data to pass to the component.
@Input() preSets: any; // The preSets for the WS call.
+ @Input() pageTitle: string; // Current page title. It can be used by the "new-content" directives.
@Output() onContentLoaded?: EventEmitter; // Emits an event when the content is loaded.
@Output() onLoadingContent?: EventEmitter; // Emits an event when starts to load the content.
diff --git a/src/core/siteplugins/directives/call-ws-new-content.ts b/src/core/siteplugins/directives/call-ws-new-content.ts
index 8bc307951..fc65d5573 100644
--- a/src/core/siteplugins/directives/call-ws-new-content.ts
+++ b/src/core/siteplugins/directives/call-ws-new-content.ts
@@ -96,7 +96,7 @@ export class CoreSitePluginsCallWSNewContentDirective extends CoreSitePluginsCal
}
this.navCtrl.push('CoreSitePluginsPluginPage', {
- title: this.title,
+ title: this.title || (this.parentContent && this.parentContent.pageTitle),
component: this.component || (this.parentContent && this.parentContent.component),
method: this.method || (this.parentContent && this.parentContent.method),
args: args,
diff --git a/src/core/siteplugins/directives/new-content.ts b/src/core/siteplugins/directives/new-content.ts
index 7981e49a0..d95b34bae 100644
--- a/src/core/siteplugins/directives/new-content.ts
+++ b/src/core/siteplugins/directives/new-content.ts
@@ -93,7 +93,7 @@ export class CoreSitePluginsNewContentDirective implements OnInit {
}
this.navCtrl.push('CoreSitePluginsPluginPage', {
- title: this.title,
+ title: this.title || (this.parentContent && this.parentContent.pageTitle),
component: this.component || (this.parentContent && this.parentContent.component),
method: this.method || (this.parentContent && this.parentContent.method),
args: args,
diff --git a/src/core/siteplugins/pages/module-index/module-index.html b/src/core/siteplugins/pages/module-index/module-index.html
index 99b109494..8d83a46b7 100644
--- a/src/core/siteplugins/pages/module-index/module-index.html
+++ b/src/core/siteplugins/pages/module-index/module-index.html
@@ -11,5 +11,5 @@
-
+
diff --git a/src/core/siteplugins/pages/plugin-page/plugin-page.html b/src/core/siteplugins/pages/plugin-page/plugin-page.html
index bb0676458..be1566304 100644
--- a/src/core/siteplugins/pages/plugin-page/plugin-page.html
+++ b/src/core/siteplugins/pages/plugin-page/plugin-page.html
@@ -11,5 +11,5 @@
-
+