[paidaccount] Using print_custom_head()

Dec 14, 2007 20:10


Paid Accounts OnlyThe following tutorial requires creating and editing a custom style, which in turn requires a paid, permanent, or early adopter account. Please read What are the paid account benefits? and How do I buy a paid account? to learn about the paid account benefits and how to buy a paid account.
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. 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.

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 add tags. Furthermore, you can choose to have different content depending on the view of your journal (recent entries, friends page, calendar, etc.).

Note that the only HTML elements that can be used in print_custom_head() are those elements that are valid in the head of a HTML document. This is limited to , , """; }
If you wish the code to be applied only to a particular page view, you can also replace Page with the appropriate child class (e.g. RecentPage, FriendsPage, YearPage, etc.).

The specific function that you define such as function Page::print_custom_head() can be used only once in your custom layer, however you can combine several elements into the same function as illustrated above and in a separate tutorial.

Additional References Creating and Using a Theme Layer
W3 school's CSS tutorial

* basic tutorials, paid accounts only

Previous post Next post
Up