fix: set sidebar only if not present
The get_context of some templates set their own sidebar if this is done, no need to override
This commit is contained in:
parent
caf2c45ed0
commit
5722d9c2ba
1 changed files with 2 additions and 1 deletions
|
|
@ -109,7 +109,8 @@ class TemplatePage(BaseTemplatePage):
|
|||
super().post_process_context()
|
||||
|
||||
def add_sidebar_and_breadcrumbs(self):
|
||||
self.context.sidebar_items = get_sidebar_items(self.context.website_sidebar, self.basepath)
|
||||
if not self.context.sidebar_items:
|
||||
self.context.sidebar_items = get_sidebar_items(self.context.website_sidebar, self.basepath)
|
||||
|
||||
if self.context.add_breadcrumbs and not self.context.parents:
|
||||
parent_path = os.path.dirname(self.path)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue