1
This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
wagtail-website-2018-spike/project/common/utils.py

11 lines
303 B
Python

from project.home.models import HomePage
def get_page_title(page):
title = "{} :: ".format(page.title)
homepage = HomePage.objects.live().first()
parent = page.get_parent()
if parent and parent.url and parent.id != homepage.id:
title += get_page_title(parent)
return title