File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -73,18 +73,20 @@ export default class PanoPluginStaffPage extends PanoPlugin {
7373 } ) ;
7474
7575 if ( config && config . displayLocation === 'THEME_PAGE' && config . pageUrl ) {
76+ const pageUrl = config . pageUrl . startsWith ( '/' ) ? config . pageUrl : `/${ config . pageUrl } ` ;
77+
7678 // Register dynamic route
7779 pano . ui . page . register ( {
78- path : ` ${ config . pageUrl } ` ,
80+ path : pageUrl ,
7981 component : staffPageComponent ,
8082 } ) ;
8183
8284 // Add to Theme Nav
8385 if ( pano . ui . nav . site . editNavLinks ) {
8486 pano . ui . nav . site . editNavLinks ( ( navItems ) => {
85- if ( ! navItems . find ( ( n ) => n . href === ` ${ config . pageUrl } ` ) ) {
87+ if ( ! navItems . find ( ( n ) => n . href === pageUrl ) ) {
8688 navItems . push ( {
87- href : ` ${ config . pageUrl } ` ,
89+ href : pageUrl ,
8890 text : `plugins.${ pluginId } .pages.staff.title`
8991 } ) ;
9092 }
You can’t perform that action at this time.
0 commit comments