diff --git a/deme_django/cms/templates/default_layout.html b/deme_django/cms/templates/default_layout.html index 250206e2..50127387 100644 --- a/deme_django/cms/templates/default_layout.html +++ b/deme_django/cms/templates/default_layout.html @@ -269,6 +269,16 @@
  • Docs
  • + {% if item %} +
    +
    + Member Of +
    + {% calculaterelationships %} +
    + {{ memberOf_box }} +
    + {% endif %} diff --git a/deme_django/cms/templatetags/item_tags.py b/deme_django/cms/templatetags/item_tags.py index c7b31680..87151e8f 100644 --- a/deme_django/cms/templatetags/item_tags.py +++ b/deme_django/cms/templatetags/item_tags.py @@ -841,6 +841,7 @@ def render(self, context): permission_cache.filter_items('view Item.name', Item.objects.filter(pk__in=all_pks)) result = [] + memberOf = [] for relationship_set in relationship_sets: friendly_name = capfirst(relationship_set['name']).replace('_', ' ') field = relationship_set['field'] @@ -848,7 +849,10 @@ def render(self, context): result.append('
    %s
    ' % (list_url, friendly_name)) for related_item in relationship_set['items']: result.append('
    %s
    ' % get_item_link_tag(context, related_item)) + if friendly_name == "Member of": + memberOf.append('
    %s
    ' % get_item_link_tag(context, related_item)) context['relationships_box'] = mark_safe('\n'.join(result)) + context['memberOf_box'] = mark_safe('\n'.join(memberOf)) context['n_relationships'] = sum(len(x['items']) for x in relationship_sets) return ''