For speed, one should load javascript content last.
For efficiency of design, it is nice to be able to add javascript
requirements to whatever templates need them.
In Rails, this is nicely resolved by content_for. In a partial, one
can write:
<% content_for :javascripts %>
<script src="http://maps.google.com/etc">
<% end %>
and then in the template, you do:
<% yield :javascripts %>
and the :javascripts content gets dropped in there.
So what is an idiomatic way of solving my same "Javascript at the
bottom" problem, and (possibly a separate question) is there an
equivalent of content_for?
--
You received this message because you are subscribed to the Google Groups
"TurboGears" 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/turbogears?hl=en.