Author Topic: Global block on all but one page?  (Read 3596 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

Offline Ruud

  • Posts: 3649
  • 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 ?>

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.