O'Reilly logo

Elgg 1.8 Social Networking by Cash Costello

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required