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 »
  • Global block on all but one page?
  • Print
Pages: [1]   Go Down

Author Topic: Global block on all but one page?  (Read 13590 times)

Offline Roych

  • Betatester
  • **
  • Posts: 573
  • Gender: Male
Global block on all but one page?
« on: September 08, 2015, 02:04:02 PM »
Hello,
Im using some droplets for procalendar on my sidebar (global block) so it's showing on all pages.


I would like to show this global block on all but one page, is this possible? So if you are on /en/calendar/  You won't see this block.


can this be done?


I tried with


Code: [Select]
<?php
$homepage 
= "/en/calendar";
$currentpage = $_SERVER['REQUEST_URI'];
if(
$homepage != $currentpage) {?>

<h4>Calendar</h4>
<p>[[procal-events?section_id=312]]</p>
<?php } ?>


but won't work...


Hope u understand.


thank you
R
Logged

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: Global block on all but one page?
« Reply #1 on: September 08, 2015, 02:33:16 PM »
All WB pages have a PAGE_ID.
You can find the correct page_id in the pages list in the /admin/.

Use the PAGE_ID like this
Code: (all pages except 123) [Select]
<?php if (PAGE_ID != 123) { ?>
... droplet code ...
<?php } ?>
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

Offline Roych

  • Betatester
  • **
  • Posts: 573
  • Gender: Male
Re: Global block on all but one page?
« Reply #2 on: September 08, 2015, 04:39:01 PM »
Great, it's working
thank you


R.
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • Global block on all but one page?
 

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