Generico Filter - a template maker

Re: Generico Filter - a template maker

by Justin Hunt -
Number of replies: 2
Picture of Particularly helpful Moodlers Picture of Plugin developers
Sorry Andy. That won't work unfortunately because the "defaults" field is not processed to replace the @@variable@@ markers.


I suppose it could, but then it would end up inserting @@variable@@ into the filter string on the page, and that would not get processed either because its not part of the template.

I think you should just do 

userfield=firstname|lastname|city|country

and then in Javascript do the processing. A bit harder than you wanted to do, I know.

eg.

var usedata='';
switch(@@userfield@@){
case 'firstname': usedata= @@USER:firstname@@;break; 
case 'lastname': usedata= @@USER:lastname@@;break;
}
In reply to Justin Hunt

Re: Generico Filter - a template maker

by Derek Chirnside -

Small problem installing Generico + Atto icon: template choices in admin do not seem to remain.  Instead I get x copies of the last template I chose, where X is the number of templates

  1. install Generico
  2. Install Icon
  3. Choose the first three templates from dropdown
  4. Add label
  5. Click icon
  6. Get 20 links to the last of the three templates I chose.

Then:

  1. Go to admin
  2. Reduce it to three templates
  3. Set three templates to different ones from dropdown
  4. Now I have three the same in atto:

Clear as mud?

Using Moodle 3.2 and Boost > Fordson

-Derek

In reply to Derek Chirnside

Re: Generico Filter - a template maker

by Justin Hunt -
Picture of Particularly helpful Moodlers Picture of Plugin developers

I think this is the Moodle 3.2 admin interface messing with Generico. The presets are expecting a single template to be on a separate page, but find themselves on a page with all the other templates at the same time.

I knew the new admin interface was not template friendly, but did not know that this happened. I will have to fix this up. Its still possible to view each template on a separate page and for now thats what you have to do.