Lesson 5: Creating a custom widget
Elgg's widget system is demonstrated through this lesson.
Problem
You need to add some custom content to your users' profiles. This may be information related to the purpose of the site (a site for sports fans could allow members to display the schedule for their favorite team on their profiles). It could be statistics about how many people have read their latest blog posts or looked through their newest photos. You may want to add a special welcome to new members or provide links to featured content.
Solution
Elgg has a widget framework that makes it easy to add content like that described above to profiles and dashboards. All that is required to create a new widget is adding two views and registering the widget. Elgg handles all of the details.
Example
In this example, we are adding a widget that welcomes new users and provides a list of useful links. We allow the user to set the number of links that are displayed. The widget looks like the following screenshot...