This object is in archive! 

Show statistic in header

Archived Alexandr . 12 years ago

Hi. I need to show statistic section in header. How can i call it in 'layout/header.phtml'? Is there any way to do this?

p.s. sorry for my english ^)

Replies (4)

photo
65

Alexandr,

Try to use view helper to output statistics block something like this:

  1. <?php echo $this->rightMenu(); ?>

You can find this view helper by path /application/modules/system/helpers/RightMenu.php

Also note, that you need overload layout/header.phtml in your custom theme to prevent file overwriting on next system upgrade.

This comment is in trash! Restore
photo
63

the thing is that I only want the numbers, that is, I want to get something like $ this-> rightMenu () -> users-> value (the number of users)

This comment is in trash! Restore
photo
64

You can't do this like you discribe it.

The most correct way to realize it - create custom view helper and extend it from System_View_Helper_RightMenu. Then you can modify the overloaded method rightMenu() code as you need to gain statistics values.

This comment is in trash! Restore
photo
59

thanks ^) I will try this.

This comment is in trash! Restore

Replies have been locked on this page!

Your vote is accepted!
Your vote is accepted!
Your vote is accepted!
Your vote is accepted!
Your vote is accepted!
Your vote is accepted!