Custom homepage links in exhibit headers

We're able to customize the banner image at the top of each exhibit in the exhibit builder, but we'd also like to use exhibit-specific "homepage" links in the header for each exhibit.

So, when a user is within one exhibit, the title in the header would correspond to the current exhibit title, and would also link to the exhibit home page.

I'm guessing we need to copy the common/header.php file into into the exhibit-builder directory within the theme.

The common/header.php file in our theme (Thanks,Roy)includes the following line:

<div id="site-title"><?php echo link_to_home_page(theme_logo()); ?></div>

How would I edit the above line of code to pull in the home page for the current exhibit? Is that possible? Is it possible to also display the exhibit title rather than the site-title?

Thanks for any help or suggestions!

I haven't tested this a whole lot, but I'm pretty sure this gets at least close to what you are describing:

<div id="site-title">
  <?php if($exhibit = get_view()->exhibit): ?>
    <p><?php echo link_to($exhibit, 'show', metadata($exhibit, 'title')); ?></p>
  <?php else: ?>
    <?php echo link_to_home_page(theme_logo()); ?>
  <?php endif; ?>

The if should make the regular site title display when you are not in an exhibit.

Hope that helps!

That did the trick, Patrick. Thank you!!