
Feature request: move template name parsing from expCore to template class
Reported by dleffler | March 31st, 2014 @ 09:23 PM
We currently do a lot of view determination in an old hack based expCore::resolveFilePaths() method. We also do much of our framework view determination in the expFramework get_common_template() & get_template_for_action() methods. It would be MUCH more efficient to create new template subclasses which allow easy creation of config, form, action, etc... views by placing a generic framework/template name method (suffix selection) and handled things within the template class. Evenmoreso, it would allow a standardized approach to looking for template variations based on the current framework such as global views, etc... which we currently do/can not do.
So, in addition to the controllertemplate & standalonetemplate having access to a common framework/template name method, we'd have:
- actiontemplate, but this may be handled by controllertemplate?
- commontemplate
and perhaps
- configtemplate
accompanied by some new general expTemplate methods such as:
- get_views() - (static) list of available type views
- get_template() - retrieve existing framework factored available view name
Comments and changes to this ticket
-
dleffler April 7th, 2014 @ 11:50 PM
Moving all template assoc methods to the expTemplate subsystem from expFramework (& expCore subsystem). Initially we'll just hack in some code to allow framework variations for global views, but need to clean up some of the template class code so we verify the view and choose the appropriate framework variation. Again this may be best as an expTemplate subsystem method instead of in the template class(es).
We typically call the controllertemplate() with the pre-determined full path to the framework appropriate view, but call the standalonetemplate() with only the view name sans a path and filetype.
At this point we've already updated the product's models getForm() method(s) to be framework variation aware. This is used before creating a controllertemplate().
-
-
-
-
-
-
-
-
-
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Bug Tracker for Exponent CMS