Activity Stream Template

If you are overriding the base.html template, but NOT registration/base_profile.html, you will need to make the following updates to enable the Activity Stream:

  1. Open base.html. On the top line, in the {% load %} tag, add layout_tags to the end.
  2. Lower in the base.html template (around line 260) add the following inside of {% block content_wrapper %}
{% block content_supplement_above %}
        {% if layouts_primary_object %}
        {% layout_supplement above layouts_primary_object %}
        {% endif %}
{% endblock %}

If you are overriding the base.html template, AND/OR registration/base_profile.html, you will need to make the following updates to enable the Activity Stream:

  1. Perform the above steps (ONLY if you are also overriding base.html)
  2. Open up your registration/base_profile.html and add the following code to the bottom of the template:
{% block content_supplement_above %}
<ul class="sub_user_header clear">
        <li><a class="profile" href="{% filter force_escape %}{% firstof person.get_absolute_url user.get_absolute_url %}{% endfilter %}">{% filter force_escape %}{% firstof person.first_name person.username user.first_name user.username %}{% endfilter %}'s profile</a></li>
        <li><a class="recent" href="{% url ellington_accounts_public_user_recent person.username %}">Activity</a></li>
        {% if person.favorites.count %}<li><a class="favorites" href="/social/{% filter force_escape %}{% firstof person.username user.username %}{% endfilter %}/favorites/">Favorites</a></li>{% endif %}
        {% if person.comment_comments.count %}<li><a class="comments" href="{% url ellington_accounts_public_user_comments person.username %}">Comments</a></li>{% endif %}
        <li><a class="votes" href="/ratings/votes/{% filter force_escape %}{% firstof person.username user.username %}{% endfilter %}/">Votes</a></li>
        {% if person.photos.count %}<li><a class="photos" href="/users/{% filter force_escape %}{% firstof person.username user.username %}{% endfilter %}/photos/">Photos</a></li>{% endif %}
        {% if person.weblogs.count %}<li><a class="weblogs" href="{% url ellington_accounts_public_user_weblogs person.username %}">Weblogs</a></li>{% endif %}
</ul>
{% endblock %}

If you need a more explicit examples of the above, please look at the base.html and registration/base_profile.html templates in your /template/ellington_default directory.

0 Comments

Add your comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.