Welcome Guest, Not a member yet? Register   Sign In
Best practice? templates vs CSS and Javascript
#1

[eluser]bartgrrr[/eluser]
Hi,

Depending on the 'type of page' (form-, overview-, search-, chart page, ...) I need/shouldn't need to use certain css and or javascript files.
For instance, a form page doesn't benefit on including css and javascript files for displaying charts.

I see 2 solutions for this type of problem.

1. Create a template page for each page type. Each template page has it's own link and script tags.

2. Create 1 template page with specific placeholders, filled in by the controller methods ($this->template->write_view).

What is the best solution? ... Or is there even a better way?

I need to use templates (footer, topmenu, ... are injected by controllers)




Theme © iAndrew 2016 - Forum software by © MyBB