PDA

View Full Version : Getting $pagetitle on Dynamic Search Page


hilaryl
09-12-2016, 04:12 AM
We have two links, 'Latest' and 'Participated', both using search.php, the first does a search for the most recent posts using 'do=getdaily', the second does a search for posts using 'do=finduser'.

After you click these two links, the URL is returned with just 'searchid=XXXXXXX'.

I'd like to be able to tell which version of page the user is on (Latest or Participated).

THIS_SCRIPT won't work because both versions use search.php

The $pagetitle global variable doesn't appear to be working so I can't use that

The only place that I can see that defines which version you are on is if you select the 'Latest' link, the breadcrumb has the last element as 'New Posts' - but I can't seem to access whatever that variable might be.

I'd like to be able to get the page title, and then use it in a conditional.

--------------- Added 1473744763 at 1473744763 ---------------

UPDATE/SOLVED

I used the information from $navbits['lastelement'] to get the title of the breadcrumb and built a conditionally statement using that.

I still can't tell if I'm on the 'Latest Posts' or 'Unread Posts' page, but this will do for now.