# Path: sitetree/sitetreeapp.py
# def get_sitetree() -> 'SiteTree':
#     """Returns SiteTree (thread-singleton) object, implementing utility methods.
#     This can return the built-in or a customized (see SITETREE_CLS setting) sitetree handler.
# 
#     """
#     sitetree = getattr(_THREAD_LOCAL, _THREAD_SITETREE, None)
# 
#     if sitetree is None:
#         sitetree = _SITETREE_CLS()
#         setattr(_THREAD_LOCAL, _THREAD_SITETREE, sitetree)
# 
#     return sitetree


from django import template
from django.template.base import FilterExpression
from django.template.loader import get_template
from ..sitetreeapp import get_sitetree
            context[self.as_var] = result
            return ''
        return result


class sitetree_urlNode(SimpleNode):
    """Resolves and renders specified url."""

    def get_value(self, context):
        return get_sitetree().url(self.item, context)


class sitetree_page_titleNode(SimpleNode):
    """Renders a page title from the specified site tree."""

    def get_value(self, context):
        return get_sitetree().get_current_page_title(self.item, context)


class sitetree_page_descriptionNode(SimpleNode):
    """Renders a page description from the specified site tree."""

    def get_value(self, context):
        return get_sitetree().get_current_page_attr('description', self.item, context)


class sitetree_page_hintNode(SimpleNode):
    """Renders a page hint from the specified site tree."""

    def get_value(self, context):

# Path: sitetree/sitetreeapp.py
# def get_sitetree() -> 'SiteTree':
#     """Returns SiteTree (thread-singleton) object, implementing utility methods.
#     This can return the built-in or a customized (see SITETREE_CLS setting) sitetree handler.
# 
#     """
#     sitetree = getattr(_THREAD_LOCAL, _THREAD_SITETREE, None)
# 
#     if sitetree is None:
#         sitetree = _SITETREE_CLS()
#         setattr(_THREAD_LOCAL, _THREAD_SITETREE, sitetree)
# 
#     return sitetree


# Path: sitetree/templatetags/sitetree.py
from django import template
from django.template.base import FilterExpression
from django.template.loader import get_template
from ..sitetreeapp import get_sitetree

            context[self.as_var] = result
            return ''
        return result


class sitetree_urlNode(SimpleNode):
    """Resolves and renders specified url."""

    def get_value(self, context):
        return get_sitetree().url(self.item, context)


class sitetree_page_titleNode(SimpleNode):
    """Renders a page title from the specified site tree."""

    def get_value(self, context):
        return get_sitetree().get_current_page_title(self.item, context)


class sitetree_page_descriptionNode(SimpleNode):
    """Renders a page description from the specified site tree."""

    def get_value(self, context):
        return get_sitetree().get_current_page_attr('description', self.item, context)


class sitetree_page_hintNode(SimpleNode):
    """Renders a page hint from the specified site tree."""

    def get_value(self, context):

        return get_sitetree().get_current_page_attr('hint', self.item, context)