Functions/public nav main

This page is outdated

The information on this page concerns an old or obsolete version of Omeka. If you are using a more recent version, instead see public_nav_main on Omeka's Read the Docs site.

Provides an unordered list of the site's main navigational sections.

Plugins may add elements to the navigation through the public_navigation_main filter.

To avoid this, or to create another named navigation element that plugins can attach to, use the public_nav() function.

Usage

<?php public_nav_main($navArray) ?>

Arguments

  • array $navArray: An array of link labels pointing to link URLs. Best practice for creating links to other parts of an Omeka site is to use the uri() helper.

Example

For an example, see the following file in the default theme:

  • theme/default/common/header.php

This function is generally used along with a php echo command. In the above file, it is called with arguments pointing to the uri's for the list of items and collections.

<?php 
echo public_nav_main(
    array(
        'Browse Items' => uri('items'), 
        'Browse Collections' => uri('collections')
    )
);
?>

CSS Styles

The default CSS style div class tag is .navigation.

Source File/Version

  • application/helpers/LinkFunctions.php since Omeka 1.0