[Catalyst] beginner question: MVC / HTML, recommended practice

Eden Cardim edencardim at gmail.com
Sat Aug 5 17:49:24 CEST 2006


On 8/3/06, Sarah Berry <berry.sarah at gmail.com> wrote:
> I've already had the opportunity to learn how to pull data from a
> database on another Catalyst page. What I'm stuck on is how best to
> generate the HTML table once I've got the data.  The structure of the
> table itself, and not just its contents, will depend heavily on the
> data.

What I'd do is create separate templates to lay out each different
table structure in separate templates as needed and have the View
choose one based on its analysis of the data fetched from the model.
The View could do some pre-processing if needed to ease data access in
the chosen template.



More information about the Catalyst mailing list