Ignore:
Timestamp:
Jun 29, 2011, 3:08:59 PM (13 years ago)
Author:
plg
Message:

add "Albums /" in the navigation path when the gallery has an homepage

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/AdditionalPages/trunk/main.inc.php

    r9713 r11574  
    5959  if ($tokens[0] == 'additional_page' and !empty($tokens[1]))
    6060    redirect(make_index_url(array('section'=>'page')).'/'.$tokens[1]);
     61
     62  if (!is_null($conf['AP']['homepage']))
     63  {
     64    $albums_url = make_index_url(array('section' => 'categories'));
     65   
     66    $page['title'] = preg_replace(
     67      '#/a>#',
     68      '/a>'.$conf['level_separator'].'<a href="'.$albums_url.'">'.l10n('Albums').'</a>',
     69      $page['title'],
     70      1 // only replace the first occurence of "a/>"
     71      );
     72  }
    6173}
    6274
Note: See TracChangeset for help on using the changeset viewer.