XF 1.3 How can I add a custom sidebar block...

rhodes

Active member
...to community/recent-activity/ or the newest-post pages (for example a twitter widget) ?

Regards, rhodes
 
Hey @TJA,
thank you for your quick reply. I use widget framework already but I'm not sure which hook I should write to the position field in this case. The block/widget should only appear on newest-post and recent-activity. Any ideas?
 
Thank you @Brogan , that's easy. I love the xf template system.

Just in the case s.o. also wants to add a widget to the sidebar of the recent-activity stream page, that's how I did it.
  • edit template news_feed_page_global

  • find the sidebar closing tag
    </xen:sidebar>

    you can place your html here directly but if you want to use widgets just define a new hook:

    <xen:hook name="recent_activity_sidebar" />
    </xen:sidebar>
  • now you can use this hook in the widgets setup form
  • if you write
    forum_list,hook:recent_activity_sidebar
    in the widgets position field, the widget will appear in the forum list sidebar and in the sidebar of the recent activity page.
 
Top Bottom