Skip to content

Commit

Permalink
Get home page name from its model
Browse files Browse the repository at this point in the history
  • Loading branch information
abitrolly committed Aug 4, 2016
1 parent 520fa03 commit 9b220c2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cpm_generic/templatetags/cpm_generic_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
from django.utils import translation
from django.conf import settings

from home.models import HomePage


register = template.Library()


@register.simple_tag
def rootpage():
return 'Home'
return HomePage.objects.get(slug='home')


@register.inclusion_tag('cpm_generic/tags/mainmenu.html')
Expand Down

0 comments on commit 9b220c2

Please sign in to comment.