Something I've found myself doing recently on large applications with static header or footer menu bars is the following: - When a user logs in, read the header / footer / etc template, fill in all template vars and save the completed file to a directory - When loading a template, place the directory containing the user specific header / footer template at the top of the path => [] array - Make sure the search_path_on_includes directive is set to '1' That's it. Now each time a user logs in, their own personalized header / footer template gets created, and there's no more need to add variables to these templates each time you run your application. --- Steve Comrie > I want to have an application howing several screens, > each screen shows the same navigation/menu bar and > some screen-specific content. > > So I have one template containing my menu bar, and several > other templates, one for each screen, each <TMPL_INCLUDING> > my "menu_bar.tmpl". > > So far, so good. But what is the best practice to avoid writing > the code for populating <TMPL_VARS> in "menu_bar.tmpl" > in every run mode? > > Other ideas? --------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/suppressed/ To unsubscribe, e-mail: suppressed For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.