Hi there,
All pages have the ability to show the Activity Stream for that page. For example, all donations show up in the Activity Stream on the donations page. Or, all endorsements show up in the Activity Stream on the endorsements page.
I've seen a site or two (such as at the bottom of this page) that has an Activity Stream on the home page that shows all of the Activity happening on every page of the site (all donations, all endorsements, all twitters, etc.). I would like to do that here. However, I have been unable to find in the documentation where it says how I can convert a regular Activity Stream into the kind that shows site-wide Activity.
Can you point me in the right direction?
Thanks!
Site-wide activity can be called using the "site.activities" variable, which is documented on the Site Variables page in our Theme Documentation. Using the Activity Variables ("type_name"), you can specify which activity types (i.e., Feedback, Donation, etc.) you would like to include (or exclude).
For example, the code to show activities from across the site might look like this:
{% for activity in site.activities limit:10 } {% unless activity.type_name == "Feedback" } {{ activity.show }} {% endunless } {% endfor }
Showing 8 reactions
Sign in with
Hines Digital
Certified Architect
Certified Expert
The code in the “Official Response” from Ian is missing some percentage signs in the code delimiters. Try the following code:
Hope this helps.
The code in the “Official Response” from Ian is missing some percentage signs in the code delimiters. Try the following code: {% for activity in site.activities limit:10 } { unless activity.is_private? } {{ activity.show }} { endunless } { endfor %}
Hope this helps.
When i try to put this code in my homepage’s template i have an error “something went wrong” and i cant save it, do you know why?
Thanks.
Hines Digital
Certified Architect
Certified Expert
Tim Wayne
Certified Architect
Certified Expert
If not, then would this hide private activity? {% for activity in site.activities limit:10 %} {% unless activity.is_private? %} {{ activity.show }} {% endunless %} {% endfor %}
Tim Wayne
Certified Architect
Certified Expert
Tim Wayne
Certified Architect
Certified Expert