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 screenshot:
We want to add our helpful tip to the sidebar as shown in the following screenshot:
Step 1: Find the view to extend
The quickest way to find the view to extend is using the Wrap views option on the Developer Settings page to wrap all the...