Get record ID in _headerModuleList.tpl (CE)

I'm trying to customize the very top navigation menu and figured out everything except for how to get the module name and record ID inside _headerModuleList.tpl (template which generates the top navigation bar)

What I tried:

- Calling $_REQUEST inside .tpl file, but since the URL contains a # it seems like the module name, record etc. are generated by JS

- Calling $bean->id, $focus->id etc.

- Setting up a custom view then defining module/record id as a smarty variable > defining a custom header in metadata for that view > reading that smarty variable inside the custom header. Problem is that it seems like we can only specify a custom 'headerTpl', but not a custom 'headerModuleList.tpl'

- Tried all relevant smarty loops inside "_headerModuleList.tpl"


May be a powerhouse like Francesca Shiekh , drifterjack drifterjack, Ara Gon would be kind enough to share their experience with this

There's surprisingly very little documentation on this except for standard modifications via admin interface

Parents Reply
  • Hi André

    I modified displayHeader() as per your advice and definitely got further.

    But it's strange, no matter which module I open up it always shows the same module name: "Home" 

    app string is: ViewAjaxUI Object
    (
    [view_object_map] => Array
    (
    [remap_action] => ajaxui
    )

    [module] => Home
    [action] => ajaxui
    [bean] =>

    [ss] => Sugar_Smarty Object

    It's like it's completely disconnected from what's happening below the header.

    I echoed out the whole contents of the object instantiated from the SugarView class but there's no mention of the bean name and record id.

    Do you think there's something else I can try?

Children
No Data