Xsecrets wrote:I don't see why subclassing would interfere with a generic form.tpl, it might actually work very well with it, but yeah I think all these ideas and more should be thrown in a pile and tested out to come up with something really good for 2.0
I meant subclassing interfering with the 2 controller concepts.
The original idea in this thread was to simplify the controller page by simply making all the post fields an array and looping through them. This assumes that the tpl file will be specific to each controller. I've implemented this in the setting.php file in 126.96.36.199 as a point of test and it works great
The second idea I had here
for using a common generic tpl, is the polar opposite of this one. It moves all control to the "Controller" (pun it baby!) and leaves the tpl file generic based on the controller data.
I'm my own devil's advocate when it comes to ideas... but now which one is better?
Don't want to start using one and having people create subclasses from it using the wrong format if we are going to go with a different method. Then again, they can technically live together, as long as the controllers that use the method from this thread use their own tpl files, and for those that use the method in the other thread, they'd use the more involved controller file.
I guess it is nice to have options and subclassers will just have to follow which ever method the parent controller uses.
The method listed in this thread is readily usable now and actually always has been for the array looping part.
The method with generic tpl was added to 1.5.0 which is simply just that one file which i renamed to "common_form.tpl" in the admin/view/template/common folder. You can use that as well in 1.5.0 and I'll add it to 188.8.131.52 for good measure on the stable version.
So I guess decide which you'd like to use for your mod