WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.9 is now available!


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • display current page path and current page id
  • Print
Pages: [1]   Go Down

Author Topic: display current page path and current page id  (Read 6570 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 :-)
Logged

Offline DarkViper

  • Forum administrator
  • *****
  • Posts: 3087
  • 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 »
Logged
Der blaue Planet - er ist nicht unser Eigentum - wir haben ihn nur von unseren Nachkommen geliehen

"We need education to cope with digitalization - and NOT the digitalization of education.!"

Tägliches Stoßgebet: Oh Herr, wirf Hirn vom Himmel !

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • display current page path and current page id
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2