I’ve got a problem with detecting single- / multiple-entry pages vs. pagination (or categories, for that matter).
The short of the matter is that I need to be able to tell if a given page is a single-entry page or a multiple-entry page. Using [if segment_3] conditions doesn’t work, since that 3rd segment could be occupied by pagination or category data. Is there some sort of [if single_entry] or [if multiple_entry] conditional?
If you really want to know why I need this, read on…
I have a number of blogs for news-y stuff; specifically: News, Press Releases, & In the News.
I want to display them all intermingled on one page - the “news” template group’s index page: /news(/index) - using a [exp:weblog:entries weblog=“news|press-releases|in-the-news” ...] tag. This works fine.
I also want to link each entry with a different weblog to a different template in that “news” template group. Items in the “news” weblog are displayed using /news/article/[title], items in the “press-releases” weblog are displayed using /news/press-release/[title], etc. This also works fine.
Now, I want to link to a page displaying only press-releases, for example. Normally I’d link to the /news/press-release/ template and put a [if segment_3 == “”] conditional in there in order to display a list (with the excerpts) if there’s no entry specified, or to display a single entry (in its entirety) if an entry is specified. Again, fine.
But now, let’s say I’ve got a large number of press releases - more than I’d like to have showing on a single page. So I limit the number to display, and add in some pagination code-whoops! Pagination beyond the first page adds another segment to the URL, thus rendering my single- / multiple-entry detection useless!
Is there another way to detect single- vs. multiple-entry pages, one that doesn’t rely on URL segments?