Lesson 2: Modifying a section of a page
Overriding a view is covered in this lesson.
Problem
There is a section of the Elgg page structure that you want to change. Perhaps you want to include an ad in the footer or rearrange the topbar. You could search for that specific HTML code in Elgg and hack it to get what you want, but then upgrades to the latest version of Elgg would be difficult. You want to do this the right way.
Solution
Elgg divides up its page structure into views. As we discussed in the last chapter, a view is a chunk of HTML code. The topbar and header are views. The search box is a view inside the header view. By changing one of these views, we change every Elgg page that uses it. With Elgg, the primary way to change a view is to override ...
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.