Migrate ew_ShowTemplates() from old version

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
sangnandar
User
Posts: 1031

Migrate ew_ShowTemplates() from old version

Post 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
}

arbei
User
Posts: 9787

Post by arbei »

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


sangnandar
User
Posts: 1031

Post by sangnandar »

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


Post Reply