jm wrote: > Dmitrii 'Mamut' Dimandt wrote: > >> Can a view be split up in separate small files? >> >> Let's say I have an admin_controller that defines up to 20 methods and >> each one needs to be renedered involving lot's of HTML. >> >> >> What I've seen so far is that you have to put all of your rendering >> functions inside the admin_view.et file which can grow really big really >> fast. >> >> What would be the easiest way to split the file up? >> > > I've been doing something wierd, to use your example, > > -module(admin_view) > > -export([ > login/1 > ]). > > > login(Data) -> > admin_html:login(Data). > > > %%%%%%%%%%%%%%%%%% end example > > I started doing this with a view of making it easier to add multilingual > support later by having admin_html_en.et, admin_html_se.et, > admin_html_de.et, etc then by adding a parameter and a test or two it > should be relatively easy to switch between html templates in the view > based on the user's preferences. I haven't tried this to date, but in > may give you a couple of ideas. > > Jeff. > > Thank you! This straightened up my thoughts a bit :)
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "erlyweb" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en -~----------~----~----~----~------~----~------~--~---
