print_custom_head()

Nov 26, 2007 20:28

Afuna and I discussed this idea of a generic print_custom_head() tutorial, that doesn't deal with adapting S1 overrides, or merging print_custom_head(), or applying print_custom_head() for specific effects like browser title or favicon... Here's my draft, and hopefully afuna will have some good comments/suggestions ;) (I know for instance we discussed $ ( Read more... )

@ status-resolved, [s2], [paid]

Leave a comment

Comments 12

av8rmike November 27 2007, 05:18:48 UTC
I was going to point out that using custom CSS in a print_custom_head function shouldn't be necessary if all the layouts support it, but I see that aveleh already beat me to the punch. I would probably de-emphasize using custom CSS, because it might confuse paid users who might think they have to create this function rather than use the Customization pages. Something like this:

The print_custom_head() method allows you to enter custom content into the section of your journal, which may be used to change the look of a journal with custom CSS, change the browser title or favicon for your journal, or add tags , or add different CSS specifiers for different page views.

Here are different examples that can be used instead of a CSS example, like Google's META tag verification or adding a description:
function Page::print_custom_head() {
"""

""";
}Of course, we'd have to mention that the "unique string" comes from registering the site with Google, not from LJ. Just my thoughts, but I've been off in left field plenty today.

Reply

camomiletea November 27 2007, 15:51:05 UTC
Thank you for your comment!

My earlier stabs at this tutorial included this piece, which explains why I thought it was important... I.e. paid users can specify different CSS for different page views using print_custom_head()

The Cascading Style Sheets (CSS) allow you to change a lot of things in your journal. All of the system layouts support the ability to enter your custom CSS [blah blah instructions here - FAQ 7 or 171]. However, if you are using a custom layout that doesn't have such an option, or if you would like to use different CSS on different page views, you can use print_custom_head() method in a custom theme layer.

Maybe I should have kept it and then went something like "The print_custom_head() method allows you to enter custom content into the section of your journal, which can also be used to change the browser title or favicon for your journal, or to add >meta> tags." What do you think ( ... )

Reply

av8rmike November 27 2007, 17:50:01 UTC
I'd hoped you didn't think I was being too critical...
Well, I had a whole big reply typed up, but accidentally closed the wrong window. =( Anyway, if this is a "generic" tutorial, shouldn't it provide more examples of what can be done? I added the one because you had suggested it to me.
How is this for the first two paragraphs?Cascading Style Sheets (CSS) allow you to change a lot of things in your journal. All of the system layouts support the ability to enter your custom CSS [blah blah instructions here - FAQ 7 or 171]. However, if you are using a custom layout that doesn't have such an option, or if you would like to use different CSS on different page views, you can use the print_custom_head() method in a custom theme layer.

Adding a print_custom_head() function allows you to enter custom HTML into the section of your journal, which can also be used to change the browser title or favicon for your journal or to add tags. Furthermore, you can choose to have different content depending on the view of your journal (recent ( ... )

Reply

camomiletea November 30 2007, 19:31:55 UTC
I like those suggestions. I've edited a bit: how does it look now?

Reply


Leave a comment

Up