How to create a lib_jquery preset to droplets

SnapDaddy

Good feedback All!

To answer the question why create a droplet to insert a droplet, for me it is for jquery presets I create for client projects and ease of use.

The presets are droplets, but have no way to be inserted, you have to remember the droplet and prams and manually type it in (unless I'm missing something)...yet we have a complete droplet system to insert droplets, with comments as how to use them. So, my post was essentially a way to use the droplet system for jquery (or other) presets.

Since I'm on this topic, if the droplet function was modified to search for existing droplet presets and include them in the droplet dropdown when inserting, it would avoiding having to do what I am doing here!

Anyhow, thanks for the help! I got it working as dbs explained... :-D
Remember, experience is what you get when you don't get what you want...

BlackBird

[url=http://wbaddons.webbird.de]http://wbaddons.webbird.de[/url] [url=http://www.WebsiteBaker.org/forum/index.php/topic,27476.msg189845.html#msg189845]Don't miss this[/url]

Ruud

In the case of the topic starter I think it makes sense.

This way you can tell a client to include a certain droplet on a page without having to tell him/her about any difficult parameters.
[url=https://dev4me.com/modules-snippets/]Dev4me - WebsiteBaker modules[/url] - [url=https://wbhelp.org/]WBhelp.org[/url]

dbs

#11
NO  :-D

For this is the page-based-function good, but i can't explain it in english.
The real droplet-call is tooooooo long.
[url="https://onkel-franky.de"]https://onkel-franky.de[/url]

BlackBird

[url=http://wbaddons.webbird.de]http://wbaddons.webbird.de[/url] [url=http://www.WebsiteBaker.org/forum/index.php/topic,27476.msg189845.html#msg189845]Don't miss this[/url]

dbs

[url="https://onkel-franky.de"]https://onkel-franky.de[/url]

Ruud

Quote from: BlackBird on August 29, 2012, 10:50:56 AM
A droplet that returns droplet markup??? I don't think this can work...

In WB 2.8.3 it should work. By default "3 levels deep"
[url=https://dev4me.com/modules-snippets/]Dev4me - WebsiteBaker modules[/url] - [url=https://wbhelp.org/]WBhelp.org[/url]

BlackBird

??? A droplet that returns droplet markup??? I don't think this can work...
[url=http://wbaddons.webbird.de]http://wbaddons.webbird.de[/url] [url=http://www.WebsiteBaker.org/forum/index.php/topic,27476.msg189845.html#msg189845]Don't miss this[/url]

dbs

You can use other droplets on other pages?
Have you tried a standard-template like "round"?
[url="https://onkel-franky.de"]https://onkel-franky.de[/url]

SnapDaddy

Yes. Here's what I have...

// this allows to include the optional module files (frontend.css, frontend.js) into the head section
if(function_exists('register_frontend_modfiles')) {
  register_frontend_modfiles('css');
  register_frontend_modfiles('js');
}
Remember, experience is what you get when you don't get what you want...

dbs

You have something like that in the head of the index.php of your template?
<?php
// automatically include optional WB module files (frontend.css, frontend.js)
if (function_exists('register_frontend_modfiles')) {
register_frontend_modfiles('css');
// register_frontend_modfiles('jquery');
register_frontend_modfiles('js');
} ?>
[url="https://onkel-franky.de"]https://onkel-franky.de[/url]

SnapDaddy

Thanks dbs, tried that, but all I get when I insert is the droplet's name of [[Slimbox2]] and not the return of [[LibInclude?lib=lib_jquery&preset=slimbox]]  :?

Here's what I have:

Name: SLimbox2
Description: Inserts the Slimbox2 Preset
Code: return "[[LibInclude?lib=lib_jquery&preset=slimbox]]";
Comments: Use: [[LibInclude?lib=lib_jquery&preset=slimbox]]

I'm using WB 2.8.3 SP1 & Droplet v1.72
Remember, experience is what you get when you don't get what you want...

dbs

Hi, don't ask, simply try:

dropletname: slimbox
return '[[LibInclude?lib=lib_jquery&preset=slimbox]]';

:wink:
[url="https://onkel-franky.de"]https://onkel-franky.de[/url]

SnapDaddy

Hi All,

Is it possible to create a droplet to insert "[[LibInclude?lib=lib_jquery&preset=slimbox]]" or other presets from the insert droplet function in the wysiwyg editor.

Thanks  :-D
Remember, experience is what you get when you don't get what you want...