Author Topic: display current page path and current page id  (Read 2931 times)

Availor

  • Guest
display current page path and current page id
« on: February 10, 2011, 12:52:05 AM »
hello,

Can someone please tell me what a variable there is for the current page and current page id?

I wanted to use a code something like this:

if(PAGE_ID == CURRENT_ID) {
}

I mean I want the script to know he is on the current page I'm viewing.

Thanks :-)

Offline DarkViper

  • Forum administrator
  • *****
  • Posts: 3062
  • Gender: Female
Re: display current page path and current page id
« Reply #1 on: February 10, 2011, 01:56:03 AM »
the constant PAGE_ID always contains the ID of the current, visible page.

also you can request the current/visible ID by calling  $wb->page_id();
the path to current page by $wb->link();

For more information read this.
« Last Edit: February 10, 2011, 02:03:24 AM by DarkViper »
Der blaue Planet - er ist nicht unser Eigentum - wir haben ihn nur von unseren Nachkommen geliehen

"You have to take the men as they are… but you can not leave them like that !" :-P
Das tägliche Stoßgebet: Oh Herr, wirf Hirn vom Himmel !

 

postern-length