forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: HappyMini on April 27, 2011, 02:21:17 pm

Title: Giving every album a custom header
Post by: HappyMini on April 27, 2011, 02:21:17 pm
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!
Title: Re: Giving every album a custom header
Post by: Αndré on April 27, 2011, 02:51:04 pm
Please post a link to your gallery and describe where exactly that 'header' should be displayed.
Title: Re: Giving every album a custom header
Post by: HappyMini on April 27, 2011, 07:00:37 pm
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
Code: [Select]
<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?
Title: Re: Giving every album a custom header
Post by: Αndré on April 27, 2011, 11:04:49 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.
Title: Re: Giving every album a custom header
Post by: HappyMini on April 28, 2011, 06:00:36 pm
Okay, thanks. I'm gonna try that one.
Title: Re: Giving every album a custom header
Post by: HappyMini on April 28, 2011, 09:48:35 pm
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:

Code: [Select]
pageheader($album_name)
But that obvious didn't work.
Title: Re: Giving every album a custom header
Post by: Αndré on April 29, 2011, 09:24:11 am
Please attach your theme's template.html and theme.php file to your next reply.