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.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


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 »
  • Droplet ShowSection with conditional parameter
  • Print
Pages: [1]   Go Down

Author Topic: Droplet ShowSection with conditional parameter  (Read 6388 times)

Argos

  • Guest
Droplet ShowSection with conditional parameter
« on: March 26, 2009, 03:47:22 PM »
I use the droplet ShowSection with an added condition. It only shows on certain pages. It looks like this:

Code: [Select]
$ids2 = array(0,1,34,36,38); // show droplet only on pages with these ID's
if (in_array($page_id,$ids2))
{
echo("[[showsection?section=56]]"); // this is the section to show
}

I am no coder, and I have done this by trial and error (took me two hours of searching and trying, don't laugh...). But it works, so I'm very proud of myself LOL  :-D

I was wondering if someone with coding skills could take this idea and rework the conditon into some parameter for the droplet, or droplets in general, or some other neat idea to easily add conditions to showing stuff.
Logged

Offline pcwacht

  • Posts: 2923
  • Gender: Male
    • Dutch ICT info
Re: Droplet ShowSection with conditional parameter
« Reply #1 on: March 26, 2009, 04:26:55 PM »
Quote
took me two hours of searching and trying, don't laugh
Not laughing, am proud of you too!

Trial and error is the best way to start coding, and coding becomes sheer fun!!

John
Logged
http://www.ictwacht.nl = Dutch ICT info
http://www.pcwacht.nl = My first
both still work in progress, since years.....

Argos

  • Guest
Re: Droplet ShowSection with conditional parameter
« Reply #2 on: March 26, 2009, 06:49:11 PM »
I found out that droplets don't work on pages with form-sections. How come? Both Form and FormX mess it up. Instead of the output of the droplet, the droplet tag is shown.
Logged

Offline pcwacht

  • Posts: 2923
  • Gender: Male
    • Dutch ICT info
Re: Droplet ShowSection with conditional parameter
« Reply #3 on: March 26, 2009, 08:56:05 PM »
At Argos,
Look here -> https://forum.WebsiteBaker.org/index.php/topic,13325.0.html

The form flushes the output cach,
seem remarking that bit out does the trick.

You can try and give feed back in that thread so Ruud and I will know what works and what not.

John
Logged
http://www.ictwacht.nl = Dutch ICT info
http://www.pcwacht.nl = My first
both still work in progress, since years.....

Argos

  • Guest
Re: Droplet ShowSection with conditional parameter
« Reply #4 on: March 27, 2009, 01:01:35 AM »
Quote from: pcwacht on March 26, 2009, 08:56:05 PM
At Argos,
Look here -> https://forum.WebsiteBaker.org/index.php/topic,13325.0.html

The form flushes the output cach,
seem remarking that bit out does the trick.

You can try and give feed back in that thread so Ruud and I will know what works and what not.

John

Thanks John. I chose to disable the filter options in the backend, that solved the problem.
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • Droplet ShowSection with conditional parameter
 

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