I need to find a way to add a css class to alternating children (much
like the “cycle” helper in regular rails apps), and after looking at
page_context.rb it seems to me that the natural way to do this would
be to extend the “children:each” tag like:
<r:children:each css=“one_class, two_class”>
where the the comma separated css values are applied to alternating
children.
What I can’t seem to figure out is:
-
Is it possible to alter page_context.rb, save the file, and then
dynamically reload it without having to stop/restart the server? -
How does one go about creating a new tag to handle the new css
class feature? For instance, each child has a corresponding <r:title
/> tag, how do I go about creating a <r:css /> tag? Or, is this the
wrong way to do things entirely?
Any help would be greatly appreciated!