[s1/s2] Tutorial: Adding a Navigation Strip

Apr 06, 2006 18:51

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 ( Read more... )

@ status-resolved, [s2], [all layouts], [s1], [paid]

Leave a comment

Comments 15

burr86 April 7 2006, 01:54:14 UTC
Looks good to me! Maybe throw something into the S1 version about how %%control_strip%% is entirely self-contained, so it'll print its own tables and stuff? Not sure if that's necessary.

Otherwise, go ahead and add 'em, and I'll make sure they get linked from the FAQ :)

Reply

kunzite1 April 7 2006, 02:00:35 UTC
over the course of its development the "Control Strip" got its name changed to "Navigation Strip" but the code names didn't change.

so. i'd like to see consistency before it has a chance to get inconsistent.

i vote that all code references use the correct names (otherwise it'd break, right) and all spoken language references use "Navigation Strip."

thoughts?

Reply

(The comment has been removed)

isabeau April 7 2006, 02:10:00 UTC
I don't think he means renaming in code, just consistency within documentation. :)

Reply


janinedog April 7 2006, 03:41:17 UTC
For S2, you don't need the call to viewer_sees_control_strip(). print_control_strip() checks that automatically. The viewer_sees_control_strip() function only exists for cases where you need to add in extra HTML/CSS that should only appear when the control strip is being displayed. (example)

Also, "Page_print()" should be "Page::print()".

Reply

isabeau April 7 2006, 03:47:22 UTC
fixed, thanks. :)

Reply

janinedog April 7 2006, 03:49:18 UTC
No problem. :)

Reply

kunzite1 April 7 2006, 20:04:14 UTC
might be nice to include documentation about viewer_sees_control_strip() anyway just in case people need to check for it for other stuff as shown in the novel conundrum layout?

Reply


camomiletea April 7 2006, 15:37:51 UTC
I'm not fond of wording in S2 part... And this doesn't necessarily have to be done in a layout, it can be done in a theme, copying the Page::print() from layout and modifying it...

Reply

isabeau April 7 2006, 15:48:03 UTC
Feel free to suggest wording changes :) I just wanted *something* up.

And it's not a "create a layout" situation. It's "edit your layout layer, or your theme layer if you're using that instead". Because a lot of the times the style will need changing, it'll be a custom layout layer already. (Not always, of course, but.)

Reply

camomiletea April 11 2006, 04:44:56 UTC
Suggested re-wording:

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:

Reply

camomiletea April 11 2006, 04:50:27 UTC
Similarly for S1:

LiveJournal provides the Navigation Strip for easy access to common site features. All system styles automatically support it, however, if you have a custom style, you will need to include the system property for printing the Navigation Strip in your style in order for it to display. This property will need to be added immediately after the tag of the HTML structure.

The rest of S1 seems okay. S2 terminology was bad - styles instead of layers, property, when it was really a built-in function...

Reply


Leave a comment

Up