Hi guys, I'm trying to add 'Browse Item Type' on the menu bar (by default we have 'Browse Items' and 'Browse Collections').
I tried to follow the recipe below:http://omeka.org/codex/Recipes/Navigate_Items_by_Type
But it's not clear to me where should I add the nav() function code?
Should I add 'itemtypes' folder inside my theme (just like collections and items folders)?
Thank you so much for all your help, I know this might be so obvious to some of you ;)
How many Item Types do you have? I went the simpler route of creating a "Browse Items" menu in the regular Navigation UI (
/admin/appearance/edit-navigation) and added links to specific queries by type (e.g. type, date, collection) in sub-menus.
>> Collection 1 search string
>> Collection 2 search string
>> 1990-1999 search string (tag)
>> 2000-2009 search string (tag)
>> Still Image search string
>> Text search string
Also worth noting that that recipe was written for Omeka 1.5, and things work differently in Omeka 2.0 and higher. The approach sheepeeh describes is one of the new features in 2.0
Thanks for a quick response...now they only have 3 or 4, they might add more in near future.
Hi Patrick and sheepeeh: the following my edit-navigation.php (admin/theme/default/appearance/edit-navigation.php):<?php
$pageTitle = __('Appearance');
echo head(array('title'=>$pageTitle, 'bodyclass'=>'settings')); ?>
<form action="<?php echo $this->form->getAction() ?>"
enctype="<?php echo $this->form->getEnctype() ?>"
method="<?php echo $this->form->getMethod() ?>"
id="<?php echo $this->form->getId() ?>"
class="<?php echo $this->form->getAttrib('class') ?>" >
<?php echo common('appearance-nav'); ?>
<?php echo flash(); ?>
<section class="seven columns alpha">
<p class="explanation"><?php echo __('Check the links to display them '
. 'in the main navigation. Click and drag the links into the preferred '
. 'display order.'); ?></p>
<?php echo $this->form->displayNavigationLinks(); ?>
<?php echo $this->form->getElement(Omeka_Form_Navigation::HIDDEN_ELEMENT_ID); ?>
<div class="add-new"><?php echo __('Add a Link to the Navigation'); ?></div>
<label for="new_nav_link_label"><?php echo __('Label'); ?></label>
<input type="text" id="new_nav_link_label" name="new_nav_link_label" />
<label for="new_nav_link_uri"><?php echo __('URL'); ?></label>
<input type="text" id="new_nav_link_uri" name="new_nav_link_uri" />
<?php echo __('Add Link'); ?>
<?php fire_plugin_hook('admin_appearance_navigation_form', array('form' => $form, 'view' => $this)); ?>
<section class="three columns omega">
<div id="save" class="panel">
<?php echo $this->formSubmit('submit', __('Save Changes'), array('class'=>'submit big green button')); ?>
<?php echo $this->form->getDisplayGroup(Omeka_Form_Navigation::HOMEPAGE_SELECT_DISPLAY_ELEMENT_ID); ?>
Omeka.Navigation.labelText = <?php echo js_escape(__('Label')); ?>;
Omeka.Navigation.urlText = <?php echo js_escape(__('URL')); ?>;
Omeka.Navigation.visitText = <?php echo js_escape(__('View Public Page')); ?>;
Omeka.Navigation.deleteText = <?php echo js_escape(__('Delete')); ?>;
<?php echo foot(); ?>
Is this the right file you're talking about? I cannot find this file in the directory you have mentioned (admin/appearance).
Where and how I can add the link? I'm really not good in php ;(
Thanks again for your help
Sheepeeh was more likely just giving the url to the page where you get an interface to edit the navigation the way she suggested. You definitely don't want to directly edit the admin theme files' PHP code.
For that small number of Item Types, what she suggests is probably best. Go to Appearance -> Navigation, and add that navigation directly. Here's some documentation on editing navigation.
Thanks Patrick...I understand now.
Say, for example I have Item Type called "Oral History",
I can add link from the admin navigation interface to add it.
I got it.
Thanks again for your help,