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
Hi, don't ask, simply try:
dropletname: slimbox
return '[[LibInclude?lib=lib_jquery&preset=slimbox]]';
:wink:
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
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');
} ?>
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');
}
You can use other droplets on other pages?
Have you tried a standard-template like "round"?
??? A droplet that returns droplet markup??? I don't think this can work...
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"
yes it works, have tested. :wink:
Okay, but does it make sense? :?
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.
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.
k, ic
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