[paidaccount] [all] Adding a Navigation Strip

Apr 06, 2006 19:29


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.
LiveJournal provides the Navigation Strip for easy access to common site features. All system styles automatically support it, however, if you have a custom layer, you may need to include the built-in function for printing the Navigation Strip in your layer in order for it to display. This function will need to be added immediately after the tag of the HTML structure.

In your custom layout or theme layer (depending on which you are using) locate the function Page::print(). Within it, you will find a tag, which may look similar to the following:

Immediately after the body tag, you will want to close off the string, add $this->print_control_strip();, and then start the string again if necessary. This will make the code look something like this:

""";
$this->print_control_strip();
"""

Should you wish to add extra HTML or CSS that would appear if the Navigation Strip is displayed, you can use the function viewer_sees_control_strip(), like this:

if (viewer_sees_control_strip()) {
"""Extra HTML or CSS to display, if the navigation strip is displayed""";
}

You will also need to enable the Navigation Strip in the Customize Journal Style page before it will appear on your journal.

Contributed by isabeau and camomiletea.

navigation strip, paid accounts only

Previous post Next post
Up