• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 Recent Activity template

#1
Hi all, had a problem I was hoping you could help with.

I'm trying to put the global news feed into another template for use on a different page. I have this code put into the template:

<div class="newsFeed">
<xen:include template="news_feed">
<xen:set var="$noContentHtml">{xen:phrase news_feed_is_currently_empty}</xen:set>
</xen:include>
<div class="extra">
<xen:if is="{$visitor.user_id}"><a href="{xen:link account/news-feed}" class="button smallButton">{xen:phrase your_news_feed}</a></xen:if>
</div>
<xen:include template="news_feed_end">
<xen:set var="$itemLoaderUrl">{xen:link recent-activity}</xen:set>
</xen:include>
<xen:include template="preview_tooltip" />
</div>

But it tells me that the news feed is empty, even though it's not when you go to url.com/recent-activity. I'm aware there needs to be a PHP callback but how do I do this? Would really appreciate it if someone could tell me what I need to do with the callback and also where to put the code please!
 

Brogan

XenForo moderator
Staff member
#2
That code won't work on another template without the data being made available to it via an add-on.