Search code examples
wagtail

How do I reference my site's title in a template?


I'm starting a Wagtail site. In the admin section, I went to Settings >> Sites >> localhost, and set "Site name" to "My first Wagtail site."

How do I display the site title in templates using Django code?


Solution

  • The tag to use is:

    {{ request.site.site_name }}