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

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