Activity Stream parent and child

414/5000
Hello,

I need to use the Activity Stream macro to view the latest activities on a page with child pages but I can not see this feature on the documentation (http://extensions.xwiki.org/xwiki/bin/view/Extension/Activity % 20Macro).

I actually use:

{{velocity}}
#set($aSpace = $NULL)
#if ($doc.space != “Main”)
#set ($aSpace = $services.rendering.escape($doc.space, ‘xwiki/2.1’))
#end

{{activity spaces=“$!aSpace” /}}
{{/velocity}}

This script only shows the activity of my page, not the children

Hi Floflobel,

Your code seems to work just fine for me. I created a new page A.WebHome and then created children A.B.WebHome and A.C.WebHome and performed some changes on them (add attachment, change title, add content, etc). I can see all the changes from the children in the Activity Stream section from A.WebHome.

Hi acotiuga,

Thank you for your return.
This script doesn’t work because it has .WebHome to the end and the script for get last activities stop to this page.
When I put manualy the path without .WebHome I get the activity of children.

Best regards,

Note that it’s working by luck since the “spaces” macro was meant for spaces and not for nested pages. I’m not sure we’ll add a new location parameter though since, in the future, we want to replace the AS by the Notifications feature and provide a new macro.