WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => Droplets & Snippets => Topic started by: instantflorian on February 12, 2010, 07:32:37 PM

Title: Droplet call in code2 or code section?
Post by: instantflorian on February 12, 2010, 07:32:37 PM
Hi,

I want to use a droplet to generate a special javascript code (e.g. to add a marker to an open street map-map).
So that's why I can't use a WYSIWYG section, because the <p></p> or <div></div> added by FCKEditor around the droplet would break the code. (Yes I know there is a way to avoid that FCKEditor adds <p> if Return is hit, but this is needed on "real" WYSIWYG sections)

So I wonder if there is any way to call a droplet from a code, code2 or html section?

Thanks in advance
instantflorian
Title: Re: Droplet call in code2 or code section?
Post by: mr-fan on February 12, 2010, 07:38:46 PM
don't test it - but [[yourDroplet]] in a codeĀ² box setting to HTML should _not_ be enclosed with any tags...?

regards martin

ps: with xft2 you could setup such things per str_replace before loading the whole $page.....so i prevent the <p> </p> 's around the [[hint_start]] and [[hint_end]] droplet/tags if there such things placed from the FCK...

Title: Re: Droplet call in code2 or code section?
Post by: instantflorian on February 12, 2010, 07:42:14 PM
Hi Martin,

the droplets in a code(2) section are not parsed (if I call the droplet [[marker]] in the frontend just [[marker]] is written into the code instead of what really should be displayed).

Oh - and I'm much to stupid for xft2 ;-)

Regards
-f.
Title: Re: Droplet call in code2 or code section?
Post by: kweitzel on February 12, 2010, 07:48:29 PM
Hi Martin,

the droplets in a code(2) section are not parsed (if I call the droplet [[marker]] in the frontend just [[marker]] is written into the code instead of what really should be displayed).

Oh - and I'm much to stupid for xft2 ;-)

Regards
-f.

I use Droplets in sourcemode of the FCK and have no issues with it. Also check, that there are no spaces inside the droplet call.

cheers

Klaus
Title: Re: Droplet call in code2 or code section?
Post by: instantflorian on February 12, 2010, 08:01:54 PM
Aaah! The spaces were the murderers!  :roll:
Title: Re: Droplet call in code2 or code section?
Post by: maverik on February 12, 2010, 08:03:42 PM
if you dont want to have a p tag for droplet call make it as a div with fck, that works for me
Title: Re: Droplet call in code2 or code section?
Post by: mr-fan on February 12, 2010, 08:05:30 PM
Hi Martin,

the droplets in a code(2) section are not parsed (if I call the droplet [[marker]] in the frontend just [[marker]] is written into the code instead of what really should be displayed).

Oh - and I'm much to stupid for xft2 ;-)

Regards
-f.

could not confirm this.....tested right now with rev. 1265 on XAMPP and rev. 1287=89  :wink: on Portable with [[loginbox]] and [[searchbox]] in a codeĀ² section (short content) with no problems....

regards martin
Title: Re: Droplet call in code2 or code section?
Post by: instantflorian on February 12, 2010, 08:13:45 PM
Now it works also in a code2 section, thanks. The droplet was not parsed because of spaces in the call.