Would it be possible to merge the "previous" and "next" links with the main navigation that has the "recent entries"/"read page"/"tags", etc links in it?
The end result I am looking for is a header navigation that goes in this order:
previous | recent entries | archive | read | tags | info | next
I would prefer if the previous/next links only show up if there are actually entries before/afterward.
I hope that was clear enough! Thanks in advance.
The end result I am looking for is a header navigation that goes in this order:
previous | recent entries | archive | read | tags | info | next
I would prefer if the previous/next links only show up if there are actually entries before/afterward.
I hope that was clear enough! Thanks in advance.
no subject
Date: 2012-12-20 07:00 am (UTC)For the code that I gave you, I only need to check if the page we're on is a RecentPage, whether it's actually a RecentPage or a FriendsPage, because the variables I need from it all end up being the same. Sometimes that might not work! Sometimes you might need to know whether it is a specific view, or a specific object and not one that includes the children.
If it's about the specific object, there's a different type operator to use called "instanceof". For that one, if I did $p instanceof RecentPage, it wouldn't return true if $p was a FriendsPage.
If it's about the specific view, Page objects have a variable called "view" that can be used to check--I think that's what I was using previously when I was only doing the entries, something like
$p.view == "entry". In that case, view would be different from recent page, or the readig page, or the network page.no subject
Date: 2012-12-20 10:34 am (UTC)no subject
Date: 2012-12-21 04:19 am (UTC)Head-scratcher
Date: 2012-12-20 11:44 pm (UTC)I always thought the hierarchy should flow more like this:
Page
>
equal in hierarchy toFriendsPage
>
which would both ownRecentPage
>
with the following descendantsTagsPage
YearPage
MonthPage
DayPage
EntryPage
EntryPreviewPage
To my mind, that makes more sense. The way it is now, FriendsPage is a descendant of Page when they should be more or less equal in value because they hold and do the same thing! But maybe I'm just not able to wrap my mind around why FriendsPage should be a descendant of Recent...
Re: Head-scratcher
Date: 2012-12-21 04:23 am (UTC)Re: Head-scratcher
Date: 2012-12-21 05:49 am (UTC)I think the other thing that threw me off is I always thought Recent was literally the first direct descendant of Page (in other words, in the hierarchy, DayPage, EntryPage, EntryPreviewPage, IconsPage, MessagePage and MonthPage would never precede it). But this was probably more a bias of mine based on how I work through the code when I'm editing an entire layout (it goes like this: Recent/Friends-Network, Entry, Tags, Archive-Month-Day - I'm kind of OCD in that I have to edit each view in exactly that order) than a rational way to order the hierarchy.
Thanks for the further explanation, the specific code I needed and all your help. :)