With the new navigation strip code thingie, I figured it would be worth explaining how to add a nav strip to custom styles. (Presumably system styles will support it, so in S2 we mainly have to worry about custom layout layers, not theme/user, unless they have stuff in the theme layer controlling the Page::print() thingum..)
These will be separate tutorials -- one in s2howto and one in howto -- but because I'm being sort of lazy, I'm collapsing them together. The stuff in green is just marking it out for my own purposes, and will not be part of the tutorial proper :)
Comments welcome.
ETA: Posted,
here (S2) and
here (S1).
***
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.
This tutorial explains how to add the navigation strip to a custom style, and involves editing your custom style to include the system property for the navigation strip. This property gets added immediately after the tag of the HTML structure.
** S1 To do this, you will need to
edit your custom style. The tag can be found in the *_PAGE variable; you can add %%control_strip%% where you want the navigation strip to appear. In this example, it's done directly following the tag of the standard Generator style while editing inside the LASTN_PAGE section:
%%control_strip%%
.
.
.
** S2 To do this, you will need to edit your custom layout layer. If you are using a theme layer that redefines the Page::print() function, either instead of or in addition to a custom layout layer, you will need to edit that as well.
In the Page_print() function, there will be a body tag. This may look something like the following:
Immediately after the body tag, you will want to close off the string, add if (viewer_sees_control_strip()) { $this->print_control_strip(); }, and then start the string again if necessary. this will look something like this:
""";
if (viewer_sees_control_strip()) { $this->print_control_strip(); }
"""
** both You will also need to enable the navigation strip in your
Edit Personal Information page before it will appear on your journal.
Contributed by
isabeau.