WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => Droplets & Snippets => Topic started by: Roych on September 08, 2015, 02:04:02 PM

Title: Global block on all but one page?
Post by: Roych 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
Title: Re: Global block on all but one page?
Post by: Ruud 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 ?>
Title: Re: Global block on all but one page?
Post by: Roych on September 08, 2015, 04:39:01 PM
Great, it's working
thank you


R.