This is an old revision of the document!


Custom Collection tab title

Edit CollectionClass.inc in islandora module and change '#title' value:

  function showFieldSets($page_number) {
    module_load_include('inc', 'fedora_repository', 'api/fedora_item');
    global $base_url;
    $tabset = array();
    global $user;
    $objectHelper = new ObjectHelper();
    $item = new Fedora_Item($this->pid);
    $query = NULL;
    if ($item->exists() && array_key_exists('QUERY', $item->datastreams)) {
      $query = $item->get_datastream_dissemination('QUERY');
    }
    $results = $this->getRelatedItems($this->pid, $query);
 
    $collection_items = $this->renderCollection($results, $this->pid, NULL, NULL, $page_number);
    $collection_item = new Fedora_Item($this->pid);
    // Check the form post to see if we are in the middle of an ingest operation.
    $show_ingest_tab = (!empty($_POST['form_id']) && $_POST['form_id'] == 'fedora_repository_ingest_form$
    $add_to_collection = $this->getIngestInterface();
    if (!$show_ingest_tab) {
      $view_selected = true;
    }
    drupal_set_message();

Tip

    $tabset['view_tab'] = array(
      '#type' => 'tabpage',
//      '#title' => 'View',
      '#title' => $collection_item->objectProfile->objLabel,
      '#selected' => $view_selected,
      '#content' => $collection_items
    );
//    $tabset['add_tab'] = array(
      // #type and #title are the minimum requirements.
//      '#type' => 'tabpage',
//      '#title' => t('Add'),
//      '#selected' => $show_ingest_tab,
      // This will be the content of the tab.
//      '#content' => $add_to_collection,
//    );
 
//    $tabset['add_collection_tab'] = array(
      // #type and #title are the minimum requirements.
//      '#type' => 'tabpage',
//      '#title' => t('Add Child Collection'),
      // This will be the content of the tab.
//      '#content' => drupal_get_form('collection_creation_form', $this->pid),
//    );
    return $tabset;
  }
 
 
frontend/colltab.1337075381.txt.gz ยท Last modified: 2012/05/15 11:49 by giancarlo

Developers: CNR IRCrES IT Office and Library
Giancarlo Birello (giancarlo.birello _@_ ircres.cnr.it) and Anna Perin (anna.perin _@_ ircres.cnr.it)
DigiBess is licensed under: Creative Commons License
Recent changes RSS feed Creative Commons License Valid XHTML 1.0 Valid CSS Driven by DokuWiki
Drupal Garland Theme for Dokuwiki