-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
It would be nice to be able to state in the config whether the title will be using parent titles and dividers or to specify an absolute title to be used without generation.
An example could be something like this
import RouterTitle from 'react-router-title';
import { Router } from 'react-router-dom';
const routes = [
{
title: "Welcome to Example Company! The best company around!", // Would be this exactly
component: Homepage,
routes: [
{
title: "Widgets", // NOTE: Title would be "Widgets | Example Company"
path: "/widgets",
component: Widgets,
routes: [
{
title: "Grand Child", // NOTE: Title would be "Grand Child | Widgets | Example Company"
path: "/widgets/:id/grand-child",
component: GrandChild
},
{
title: "Need Help with widgets? | Example Company", // NOTE: Title would be "Need Help with widgets? | Example Company"
path: "/widgets/help",
component: WidgetHelp
}
]
}
]
}
];
const App = () => (
<Router>
<RouterTitle pageTitle="Example Company" routesConfig={routes} divider="|" />
{/* your routes */}
</Router>
);
export default App;A solution could
- Different property such as
absoluteTitlewithtitleexcluded - Modifier such as
titleConcat: 0meaning don't concat the above N levels (would be nice for the last route example)
Metadata
Metadata
Assignees
Labels
No labels