get_current_item error

Hi,

I am getting the following error (Followed by 24 more lines) when selecting an exhibit page that currently does not contain any items in its template:

Error:An item has not been set to be displayed on this theme page! Please see Omeka documentation for details.#0 /var/www/omeka/application/helpers/ItemFunctions.php(213): get_current_item()

Is it the case that an exhibit page MUST contain at least one item?

I am using as a template a modification of the "text" template.

willis,

What version of Omeka and ExhibitBuilder are you using? On Omeka 1.2 with ExhibitBuilder 1.2-0.5.2, I created an exhibit with a single section and a single page that used the text-only layout. I had no items in my archive. The exhibit seemed to display fine.

I'm exactly sure how your theme view is setup, but you could catch this exception in your view by putting try/catch code around your function call, perhaps something like:

try {
  $item = get_current_item();
} catch (Exception $e) {
  $item = null;
}

if ($item) {
// whatever you want to do assuming that a current item exists
} else {
// whatever you want to do assuming that the current item does not exist
}

Hi,

I am using Omeka v.1.1 and Exhibit builder v.0.5.1. I am now using the plain text layout:

<?php
//Name: Text;
//Description: A full page of text;
//Author: Jeremy Boggs;
?>

<div class="text-full">
<div class="primary">
<div class="exhibit-text">
<?php echo exhibit_builder_page_text(1); ?>
</div>
</div>
</div>

I get the same error. I am not clear as to how the get_current_item function relates to the exhibit_builder_page_text function...

Beth