Giving every album a custom header Giving every album a custom header
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Giving every album a custom header

Started by HappyMini, April 27, 2011, 02:21:17 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

HappyMini

Hi there,

I'm trying to customize Coppermine to fit my own website. My old website uses a concept that every album has an own header. Every header includes an own backgroundimage and the album title.

First, the album title was simple I thought. Maybe I could add a token like {Album title}. But sadly, there are no tokens available, only the {Gallery} token and no tokens for things inside the gallery.

Second, how do I manage to give every Coppermine album an own header. I know you can add a custom header for all the albums, but how do you add one for each album separately?

Thank you in advance!

Αndré

Please post a link to your gallery and describe where exactly that 'header' should be displayed.

HappyMini

Well, my Coppermine installation is not online yet. But my template.html looks like this:

- Site header (every page the same)
- Album header div (every album another background and text)
- Site menu etc.
- {Gallery}
- Some copyright notice etc.

The album 'header' is just a div, given another background on every page with the following
<div id="header_album2" style="background-image: url(img.jpg);">The Album Title</div>

The other solution I thought about, is to keep my original pages and include just 1 Coppermine album at once. Maybe that's easier? So on 1 page you can view only 1 album. Maybe there's a special code for that trick?

Αndré

Quote from: HappyMini on April 27, 2011, 02:21:17 PM
Maybe I could add a token like {Album title}
You can replace that token with the help of the pageheader function. Just copy it to your theme's theme.php file and edit it to your needs.

HappyMini

Okay, thanks. I'm gonna try that one.

HappyMini

I'm stuck again: I want to print the album name in my header. But what's the right code to do such a thing?

Was thinking about something like this:

pageheader($album_name)

But that obvious didn't work.

Αndré

Please attach your theme's template.html and theme.php file to your next reply.