Edit Pages icons

How can to change Pages icons with User avatar for Elgg 1.8 How can to change Pages icons with User avatar for Elgg 1.8

Open the file

elgg\mod\pages\views\default\object\page_top.php

Add this code

$owner = $vars['entity']->getOwnerEntity();

And change this code

$page_icon = elgg_view('pages/icon', array('annotation' => $annotation, 'size' => 'small'));

With this

$page_icon = elgg_view_entity_icon($owner, 'small');

Change Pages icons with User avatar for Elgg 1.8

Share on Facebook
Share on Twitter




4 Responses to “Edit Pages icons”

  1. Becky Rundle says:

    I followed the instructions stated but the pictures didn't change nor did it give me the option to add a picture. When I save the change it said that I was saving in plain text, would this have something to do with it? Thanks

    • pianist says:

      I checked this hack again and it works very well.

      Check it again:

      [Elgg]
      version 1.8.11

      [File]
      mod\pages\views\default\object\page_top.php

      [Code]
      Line 36 $owner = $vars['entity']->getOwnerEntity();
      Line 37 $page_icon = elgg_view_entity_icon($owner, 'small');

  2. faiz says:

    It worked very nice. thank you

  3. Anthony says:

    Awesome worked perfect!!

Leave a Reply



Similar Elgg Hacks