Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 12 Sep 2016, 06:12
hilaryl hilaryl is offline
 
Join Date: Jan 2006
Getting $pagetitle on Dynamic Search Page

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 13 Sep 2016 at 05:32 ---------------

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.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 15:27.

Layout Options | Width: Wide Color: