[personal profile] nightowl posting in [community profile] style_system
Hi all,

Does anyone know how to get the Transmogrified theme to display the journal subtitle? I've been looking and looking for CSS that would do this, since I figured it'd be relatively simple, but apparently not? I would appreciate any help that is offered. Thanks so much!

Date: 2009-07-24 07:16 pm (UTC)
branchandroot: oak against sky (Default)
From: [personal profile] branchandroot
That isn't a css thing, the journal subtitle isn't called by Transmogrified at all; it doesn't appear in the html. What you would need to do is make a theme layer that adds the subtitle to your header. If you want to try that, I'll look up which function you need to paste in; it shouldn't be too complicated.

Date: 2009-07-24 07:36 pm (UTC)
branchandroot: oak against sky (Default)
From: [personal profile] branchandroot
ETA: Bugger! The anchor tags were, of course eaten. Let me try to put code tags around that...

ETA2: ...I really hate this about our journals. Okay, I'm adding spaces to the anchor tags; you will have to take them out or your title won't link properly!

As Adalger says, it's the Page::print function you will need to copy and paste. If you look at the code of Transmogrified here, it's the very first thing called a "function", right after all of the properties. You will need to copy that function (from "function" down to the last "}" before the next function) and paste it into a theme layer.

To make a theme layer, go to Advanced Customization and click on "Your Layers" down at the bottom. Now go to the bottom of the Layers page to "Create a layout-specific layer". Set the dropdowns to "theme" and "Transmogrified" and hit create. The page will reload and now, in the table under Your Layers will be an unnamed theme layer. Hit the "edit" button next to that.

Now you're in a weird looking page with three windows. In the biggest window (top right) paste the Page::print function. Hit "Save and Compile" up at the very top.

Now you need to edit the function just a little. Look down a bit to where it says:

"""
< a name="top" >
""";
$this->print_global_title();
"""
< /a >

""";

You will want to edit that, adding the code """; $this->print_global_subtitle(); """ underneath the < /a > for $this->print_global_title();. So the section will now look like this:

"""
< a name="top" >
""";
$this->print_global_title();
"""
< /a >
""";
$this->print_global_subtitle();
"""

""";

Save and Compile again. Now hit the back button until you get out of the gray page! You'll need to go to the Select Style area and select your new layer as the Theme you are using. The easy way to find it is to hit "Your Custom Layers" in the side navigation.
Edited Date: 2009-07-24 07:38 pm (UTC)

Re: Whoot!

Date: 2009-07-24 08:26 pm (UTC)
branchandroot: oak against sky (Default)
From: [personal profile] branchandroot
My pleasure!

Date: 2009-07-24 10:01 pm (UTC)
snakeling: Statue of the Minoan Snake Goddess (Default)
From: [personal profile] snakeling
Let me introduce you to the HTML-for-LiveJournal Modification Tool. It's a life saver :D

Date: 2009-07-24 10:03 pm (UTC)
branchandroot: oak against sky (Default)
From: [personal profile] branchandroot
Ha! *adds this to her browser bar* Thanks!

Date: 2009-07-24 07:32 pm (UTC)
foxfirefey: A wee rat holds a paw to its mouth. Oh, the shock! (myword)
From: [personal profile] foxfirefey
Oh wow, everybody is fast. The theme layer should be a bit like this:

layerinfo "type" = "theme";
layerinfo "name" = "Transmogrified Subtitled";

function Page::print()
{
    """
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>""";
        $this->print_head();
        $this->print_stylesheets();
        $this->print_head_title();    
    println "</head>";
    $this->print_wrapper_start();
    $this->print_control_strip();
    """
            <div id="container">
            <div id="header">
    """;
    """
                <a name="top">
    """;
    $this->print_global_title();
    $this->print_global_subtitle();
    """
                </a>
            </div>
    """;
    $this->print_module_section("one");
    """
            <div id="wrap">
            <div id="content">
    """;
    $this->print_body();
    """
            </div>
    """;
    $this->print_module_section("two"); 
    """
            </div><div style="clear:both;"></div>
        </div>
        <div id="footer">
    """;
    $this->print_module_section("three");
    """
        </div>
    """;
    $this->print_wrapper_end();
    """
    </html>
    """;
}


Or is it better in a user layer?
Edited Date: 2009-07-24 07:33 pm (UTC)

Date: 2009-07-24 07:43 pm (UTC)
foxfirefey: A fox colored like flame over an ornately framed globe (Default)
From: [personal profile] foxfirefey
I think [personal profile] branchandroot has the instructions about creating new layers. You can use mine as a complete copy paste, and then come back when it's created and I'll see if I can't give instructions on hooking it up to your current theme.

Date: 2009-07-24 08:58 pm (UTC)
foxfirefey: A fox colored like flame over an ornately framed globe (Default)
From: [personal profile] foxfirefey
If you already have a custom theme, you can just add the function in the one I gave to your current one!

Date: 2009-07-24 07:39 pm (UTC)
branchandroot: oak against sky (Default)
From: [personal profile] branchandroot
You know, that's a good question. I've always used a theme layer for it; I don't know whether a user layer will let you change this stuff!

Date: 2009-07-24 07:42 pm (UTC)
foxfirefey: A fox colored like flame over an ornately framed globe (Default)
From: [personal profile] foxfirefey
I have no clue myself--I think it might not, but I haven't tried yet. I *think* theme layer is the proper place.

Date: 2009-07-24 07:45 pm (UTC)
adalger: Earthrise as seen from the moon, captured on camera by the crew of Apollo 16 (Default)
From: [personal profile] adalger
I'm fairly sure theme is the right place. As I recall (though I can't find documentation at the moment), you simply can't put functions into a User layer.

Date: 2009-07-24 10:03 pm (UTC)
snakeling: Statue of the Minoan Snake Goddess (Default)
From: [personal profile] snakeling
You can definitely put functions in a user layer, but it's a bad idea, as it would get rewritten the next time you use the wizard to modify something.

Date: 2009-07-24 10:02 pm (UTC)
snakeling: Statue of the Minoan Snake Goddess (Default)
From: [personal profile] snakeling
It's always better to put it in a theme layer, because the next time you modify something using the wizard, the user layer is rewritten, losing all your modifications :)

Date: 2009-07-24 10:03 pm (UTC)
foxfirefey: A fox colored like flame over an ornately framed globe (Default)
From: [personal profile] foxfirefey
Is there a good guide to this stuff? I really should get caught up, since I'm doing some styles work.

Date: 2009-07-24 10:17 pm (UTC)
snakeling: Statue of the Minoan Snake Goddess (Default)
From: [personal profile] snakeling
Nothing official, alas. The S2 documentation is pathetic right now, though I know it's one of the goals of the Dreamwidth style team. That said, [livejournal.com profile] kentucka has done some great basic tutorials.

Date: 2009-07-24 07:44 pm (UTC)
foxfirefey: A fox colored like flame over an ornately framed globe (Default)
From: [personal profile] foxfirefey
Also--the weirdest thing is Transmogrified has CSS styling for h2 in the #header, but it doesn't appear. I'm wondering if we can't just add it in to the base style itself.

Date: 2009-07-24 07:50 pm (UTC)
branchandroot: oak against sky (Default)
From: [personal profile] branchandroot
That is weird. It must have been meant to be included at some point. If the print_global_subtitle is added to the Transmogrified layout layer, the styling should just take effect, then. That's good!

Date: 2009-07-24 07:53 pm (UTC)
foxfirefey: A fox colored like flame over an ornately framed globe (Default)
From: [personal profile] foxfirefey
Yeah, the styling is there:

	#header h2 {
		padding: 0 20px 20px 20px;
	}


A bit more padding than I like, but it's very much useless if the subtitle is never printed! I could make a patch for this insanely easily and maybe [personal profile] afuna could review and check it in and it'd go out next code push.

Date: 2009-07-24 07:18 pm (UTC)
adalger: Earthrise as seen from the moon, captured on camera by the crew of Apollo 16 (Default)
From: [personal profile] adalger
This isn't a CSS issue, it's an issue within the Transmogrified style itself. The style never calls the function that prints the journal subtitle, so it's just not availlable. To get the theme to print the subtitle, you'd need to use the advanced customization area, and create a custom layer to override the Page::print() function.

The basic idea is, you create your own private version of Transmogrified, then go tinker with the style code to make it do what you want it to do.

Date: 2009-07-24 07:30 pm (UTC)
foxfirefey: A fox colored like flame over an ornately framed globe (Default)
From: [personal profile] foxfirefey
Unfortunately CSS won't help you here. I'm not sure why it's not just in the style to begin with and have contacted the styles team about it; we might be able to just add it in.

In the meantime, I *can* tell you how to do it using layer overrides, if you're willing to be a little patient with me, since I've never instructed anybody in how to do it before. But I've gotten it working myself.

Profile

Dreamwidth style system discussion

September 2025

S M T W T F S
 123456
78 910111213
14151617181920
21222324252627
282930    

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 15th, 2025 05:01 am
Powered by Dreamwidth Studios