static void addMenuComponent(final PageParameter pp) {
   final MenuBean menu =
       (MenuBean)
           pp.addComponentBean("AbstractHeaderPage_menu", MenuBean.class)
               .setMenuEvent(EMenuEvent.mouseenter)
               .setSelector(".re .acts .link_menuicon");
   final AbstractElement<?>[] eles =
       new AbstractElement[] {
         ModuleContextFactory.get(IMyPortalWebContext.class).toMyPortalElement(pp),
         ModuleContextFactory.get(IFavoriteWebContext.class).toMyFavoriteElement(pp)
       };
   for (final AbstractElement<?> ele : eles) {
     if (ele instanceof LinkElement) {
       final LinkElement link = (LinkElement) ele;
       if ("-".equals(link.getText())) {
         menu.addItem(MenuItem.sep());
       } else {
         menu.addItem(MenuItem.of(link.getText()).setUrl(link.getHref()));
       }
     }
   }
   menu.addItem(MenuItem.sep());
   menu.addItem(
       MenuItem.of($m("DemoTemplateT1.0")).setUrl(AbstractMVCPage.url(UserAttriPageT2.class)));
 }
 protected String getImgBase(
     final ComponentParameter cParameter, final Class<? extends AbstractMVCPage> pageClass) {
   return AbstractMVCPage.get(pageClass).getCssResourceHomePath(cParameter) + "/images/";
 }