elfgirl (
elfgirl) wrote in
getting_started2009-05-04 10:17 am
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
![[community profile]](https://www.dreamwidth.org/img/silk/identity/community.png)
Entry tags:
Rotating Headers in Transmogrified?
Thanks!
Sorted! From the instructions found here:
NOTE: This solution is only workable with custom theme layers, which means you have to have some sort of paid account. It may or may not work with the other S2 DW themes. (ETA: it also works with Negatives.)
1. Create a custom theme layer by going to Organize > Select style > Developer Area > Your Layers and selecting Create layout-specific layer, type: theme, layout: transmogrified
2. Add the following code to your theme layer:
function Page::print_custom_head()
{
var string[] header_image;
var int header_index=0;
$header_image[$header_index++] = "http://www.imageaddy.com/header_1.jpg";
$header_image[$header_index++] = "http://www.imageaddy.com/header_2.jpg";
$header_image[$header_index++] = "http://www.imageaddy.com/header_3.jpg";
var string header_url = $header_image[rand($header_index) - 1];
"""
<style type="text/css">
#header {
background-image: url("$header_url"); /* Header image URL */
height: 140px;
background-scroll: no-scroll;
background-repeat: no-repeat;
background-position: center;
}
#header h1 {
display: none;
}
#header h2 {
display: none;
}
</style>
""";
}
Replace the "http://www.imageaddy.com/header_1.jpg" with the URL of whatever images you'd like to use for your rotating headers. Change the height under the #header CSS code to whatever the height of your header is.
3. Click the Compile and Save button in the top left corner.
4. Go to Organize > Select journal style > Your custom layers and choose the custom Transmogrified layer.
no subject
*cowers in corner* ;)