Virtualmin plugin API - how to use get_template in feature_setup function?

  • milosh
  • 01/12/11
  • Offline
Posted: Sun, 2011-01-16 16:55

Hi,

I am working on Virtualmin plugin to have a configurable server options in Plugin Options page. The documentation claims, that I can access my template_imput parameters with get_template function (see: https://www.virtualmin.com/documentation/developer/plugins).

However I get an error message: Undefined subroutine &nginx::get_template called at /usr/share/webmin/nginx/virtual_feature.pl.

I have used: local $tmpl = &get_template($_[0]->{'template'});

What would be the correct way to access my parameter?


get_template function

  • JamieCameron
  • 10/23/08
  • Offline
  • Mon, 2011-01-17 17:15

You will need to use &virtual_server::get_template , as that function is defined in the Virtualmin (virtual-server) module.