The S2 HowTo Journal

Tips, Tricks, and Tutorials for Basic S2 Customization

Previous Entry Share Next Entry
[paidaccount] [all] Adding a Navigation Strip
howto_user wrote in s2howto
Paid Accounts Only
The 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 <body> 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:

<body bgcolor="$*page_back" text="$*entry_text" link="$*page_link" vlink="$*page_vlink" alink="$*page_alink">
<div align="center">

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:

<body bgcolor="$*page_back" text="$*entry_text" link="$*page_link" vlink="$*page_vlink" alink="$*page_alink"> """;
$this->print_control_strip();
"""

<div align="center">

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.


Comments Disabled:

Comments have been disabled for this post.

?

Log in

No account? Create an account