Generico Filter
Maintained by
Justin Hunt
Generico is a simple filter for creating templates of code snippets and text that can be inserted into Moodle text areas.
Comments
Comments are no longer open for new posts. Existing comments remain available to read.
is it by changing the following line:
define('FILTER_GENERICO_TEMPLATE_COUNT', 20);
on the lib.php?
I've done that and it does give me more templates, but when i use any templates above 20 after setting it all up, the {generico code returns blank.
am i missing something?
can you help me?
cheers,
dan
https://moodle.org/mod/forum/discuss.php?d=261896#p1202120
I think you are referring to the "toggle" preset? So something like:
{GENERICO:type="toggle" text="read more .."}
blah blah blah blah
{GENERICO:type="toggle_end"}
You would just alter the template where it says:
To be open by default always ... you would change it to this:
To have a template variable which allows you alter the default when adding the string:
open=block
"yes/no" could work but you would have to write some javascript to turn yes and no into "block" and "none." Its simpler to just remember: none or block
In the toggle example I tried to give a simple example of using YUI from a template. It would certainly be possible to add a "supertoggle" with easy to set defaults and animation etc. But then it wouldn't be a simple example ...
I have a question about
{collapsible}[read more...]
Your text/HTML here.
{collapsible}
This code hides the content by default. Is there a way to have it open, e.g., open="yes/no"?
eg
{GENERICO:type=T}
I am asking myself whether it can be used for even simpler auto-replacement operations. E.g. for this: Whenever someone types "@@@" in a posting's heading, the text would be replaced by "APPROVED:".
Would there be some syntax for that?