Welcome, Guest. Please login or register.
Did you miss your activation email?
May 25, 2012, 09:24:31 AM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155482 Posts in 21708 Topics by 7734 Members
Latest Member: adrielkhollis4
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Droplet ShowSection with conditional parameter  (Read 737 times)
Argos
Moderator
**
Offline Offline

Posts: 2156


WWW
« 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:
$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  grin

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

Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase: http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
pcwacht
AddOn Development
*
Offline Offline

Posts: 2856



WWW
« 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
Moderator
**
Offline Offline

Posts: 2156


WWW
« 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

Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase: http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
pcwacht
AddOn Development
*
Offline Offline

Posts: 2856



WWW
« Reply #3 on: March 26, 2009, 08:56:05 PM »

At Argos,
Look here -> http://www.websitebaker2.org/forum/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
Moderator
**
Offline Offline

Posts: 2156


WWW
« Reply #4 on: March 27, 2009, 01:01:35 AM »

At Argos,
Look here -> http://www.websitebaker2.org/forum/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

Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase: http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!