[personal profile] marahmarie posting in [community profile] style_system

A while ago [personal profile] ninetydegrees wrote me wonderful code to add Prev/Next links to the navlinks on most pages but I've noticed they're not on the Reply page. I checked here: http://wiki.dwscoalition.org/wiki/index.php/S2_Cookbook:_Modules (where I think someone put the code after giving it to me) but I don't see the specific s2 needed for them to show up there. I'd also like to get them on pages that have their URLs written like: http://mm-writes.dreamwidth.org/123456.html?replyto=123456 (not sure if that falls under the same request or if more s2 would be needed, so thought I'd mention it).

Also, for future s2 coding endeavors, is there any way for me to parse out on my own exactly what variations in the code I would need to do something like this? (When I tried small variations on the existing s2 I got various errors like "Can't find member 'prev_url' in ReplyPage", "Unknown type or class 'Reply'" and so on - I did try everything I could think of variation-wise).

Lastly, I'm trying to get the navlinks bar to a minimum width across the top of the page on all page views - without adding to the existing margins or padding because I'm trying to prevent text wrapping - but I realize the Prev/Next links would not be a good choice/not even be possible to add on say, the Archive and Month (not Day) pages so I want to do custom URLs just on those pages instead. How would I get the custom URLs to show up in the navlinks for just those two pages?

Thanks so much in advance!

Re: For the last qustion I asked in the OP...

Date: 2014-06-24 07:44 pm (UTC)
ninetydegrees: Art: self-portrait (Default)
From: [personal profile] ninetydegrees
Hmm. Something like this?

} elseif ( $p isa MonthPage ) {
"<a href='http://www.dreamwidth.org/'>Previous</a>";
"<a href='http://www.dreamwidth.org/'>Next</a>";
}

Re: For the last qustion I asked in the OP...

Date: 2014-06-24 10:00 pm (UTC)
ninetydegrees: Art: self-portrait (Default)
From: [personal profile] ninetydegrees
Oh sorry you need to keep the $prev_link = bit to keep the styling.
Also archive page is YearPage so I think if you do another elseif using this it should work.

Re: For the last qustion I asked in the OP...

Date: 2014-06-24 10:24 pm (UTC)
ninetydegrees: Art: self-portrait (Default)
From: [personal profile] ninetydegrees
Same issue as before I guess. Can you try it without prev_url like so?
elseif ( $p isa YearPage ) {
$prev_link = "<a href='http://www.dreamwidth.org/'>Previous</a>";

Re: For the last qustion I asked in the OP...

Date: 2014-06-25 07:59 am (UTC)
ninetydegrees: Art: self-portrait (Default)
From: [personal profile] ninetydegrees
Hmm. Looking at Core2 YearPage and MonthPage are independent (except that they're both extensions of Page). I think you only have FriendsPage extends RecentPage. Otherwise each page is its own thing, even ReplyPage actually.
You're welcome!

Profile

Dreamwidth style system discussion

February 2026

S M T W T F S
1234567
89 1011121314
15161718192021
22232425262728

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 11th, 2026 08:33 am
Powered by Dreamwidth Studios