I wish to include collection title when browse items:
URL: http://biblioteca.periodicas.edu.uy/items/browse?collection=11
I have tryed with:
echo collection('Name')
collection('Name'), array('collection' => collection('id'))
without success.
Can you tell me how to get the Collection name when I browse items of a collection ?
Thank you.
Rodolfo
On that page, information about the collection hasn't been set on the page. Before you call
echo collection('Name')
do something like this to dig up and set the current collection:
<?php
$collection_id = $_GET['collection'];
$collection = get_collection_by_id($collection_id));
set_current_collection();
echo collection('Name');
?>
That should make
Thank you patrickmj !
I put this code to show collection name+link when browse items of a collection and nothing when browse all items:
<?php
$collection_id = $_GET['collection'];
$collection = get_collection_by_id($collection_id);
set_current_collection($collection);
?>
<h1><?php
if (isset($_GET['collection'])) {
echo link_to_collection(collection('Name'));
} ?><br /><?php echo total_results(); ?> nĂºmeros disponibles</h1>
Makes sense! Glad it worked!