Page 1 of 1

Migrate ew_ShowTemplates() from old version

Posted: Mon Sep 16, 2024 3:00 pm
by sangnandar

In v2018 there's function ew_ShowTemplates() so that I can do this

// Startup script
$(document).on("rendertemplate", function(e, args) {
	if (args.template) {
		args.enabled = false; // do not render template
		ew_ShowTemplates(classname); // show initial table
	}
});

What is the equivalent of this function in v2024?

My goal is to do this

// Startup script
if (ew.IS_MOBILE) {
  // render template
} else {
  // don't render template, show initial table
}

Re: Migrate ew_ShowTemplates() from v2018

Posted: Mon Sep 16, 2024 5:36 pm
by arbei

You better check out the source code of ew_ShowTemplates() in v2018 and follow suit.


Re: Migrate ew_ShowTemplates() from v2018

Posted: Mon Sep 16, 2024 11:19 pm
by sangnandar

Thank you. Just to make sure before copying the old ew_ShowTemplates() to client Global Code.