get_current_record
— Get the current record from the view.
Summary
- get_current_record($recordVar, $throwException = true)
Get the current record from the view.
- Parameters:
$recordVar (
string
) – View variable the current record is stored in.$throwException (
bool
) – Whether to throw an exception if no current record was set. The default is to throw.
- Returns:
Omeka_Record_AbstractRecord|false
Usage
Examples
Use the $throwException boolean to turn off the default alert when no current record is set.
<?php echo get_current_record('item', false); ?>