Alexander Banthien wrote:

> we are trying to fit our javascript-based navigational-dropdowns into
> the layouts-navigations-screens-design. As far as I found out only a
> handful of methods exist for accessing and modifying the
> <head>...</head>-section of the HTML-pages. In particular no
> TemplatePageAttributes.setScript(...)-method (or so) exists. How do you
> get your method-definitions into the head?
> My aim is to dynamically create the nav-bar via VM in order to reflect
> certain per-user-settings.

TemplatePageAttributes is a leftover from the times when Turbine was
based on ECS.
It stands quite contrary to the templating philosophy that Turbine is
following now.

You can look at WebMacroOnlyLayout class for a solution that lets you
define the
head section of the HTML page components within the Layout template. It
should
work well for most scenarios. You can have a Navigation class+template
that 
will be embeded into the head part of your Layout template that will
generate
any JavaScript you need.

Some time ago, an idea crossed my mind, that we might want to introduce
another layer of templating, namely Page template. It would contain
the common elements of all Layout templates used in conjuncion with
WebMacrOnlyLayout class. An application will use precisely one
Page template, the same way as it uses single Page class now.
This would bring us back to the separation between head and body parts
of the page we had with ECS, but with template driven customization
of head elements available to the developer.

Opinions on the above are appreciated.

Rafal

--
Rafal Krzewski
Senior Internet Developer
mailto:[EMAIL PROTECTED]
+48 22 8534830 http://e-point.pl


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to