Lesson 3: Adding new content to a page

Extending a view is demonstrated in this lesson.

Problem

Instead of modifying an area of a page as in the preceding lesson, you want to add new content. This could be including a "Share this" link under every blog, a welcome message to visitors under the header, or a Twitter feed in the sidebar. What is the best way to do this with Elgg?

Solution

Instead of overriding a view, we can extend it. Extending a view adds our content directly below (or above) the view. This is the easiest way to insert new content into a page.

Example

In our example, we would like to add some tips on how to use the site on each page. A good location for these tips is under the sidebar menu. Currently the sidebar looks like the following ...

Get Elgg 1.8 Social Networking now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.