Changeset 21208


Ignore:
Timestamp:
Mar 5, 2013, 1:29:47 PM (11 years ago)
Author:
mistic100
Message:

fix bread-crumb, simplify modification of body_id

Location:
extensions/ContactForm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/ContactForm/include/functions.inc.php

    r20795 r21208  
    1111  if ($tokens[0] == 'contact')
    1212  {
     13    add_event_handler('loc_begin_page_header', 'contact_form_header');
     14   
    1315    $page['section'] = 'contact';
    14     $page['title'] = $page['section_title'] = '<a href="'.get_absolute_root_url().'">'.l10n('Home').'</a>'.$conf['level_separator'].'<a href="'.CONTACT_FORM_PUBLIC.'">'.l10n('Contact').'</a>';
    1516    $page['is_homepage'] = false;
     17   
     18    $page['title'] = l10n('Contact');
     19    $page['section_title'] = $page['section_title'] = '<a href="'.get_absolute_root_url().'">'.l10n('Home').'</a>'.$conf['level_separator'].'<a href="'.CONTACT_FORM_PUBLIC.'">'.l10n('Contact').'</a>'; 
    1620  }
    1721}
    1822function contact_form_header()
    1923{
    20   global $page, $template;
    21  
    22   if (isset($page['section']) and $page['section'] == 'contact')
    23   {
    24     $page['body_id'] = 'theContactPage';
    25     $template->assign('BODY_ID', $page['body_id']);
    26   }
     24  global $page;
     25  $page['body_id'] = 'theContactPage';
    2726}
    2827
  • extensions/ContactForm/main.inc.php

    r20441 r21208  
    3030{
    3131  add_event_handler('loc_end_section_init', 'contact_form_section_init');
    32   add_event_handler('loc_end_page_header', 'contact_form_header');
    3332  add_event_handler('loc_end_index', 'contact_form_page');
    3433  add_event_handler('blockmanager_apply', 'contact_form_applymenu', EVENT_HANDLER_PRIORITY_NEUTRAL+10);
Note: See TracChangeset for help on using the changeset viewer.