[Newbies] body tag in seaside

Randal L. Schwartz merlyn at stonehenge.com
Fri Nov 21 12:12:09 UTC 2008

>>>>> "Tony" == Tony Giaccone <tony at giaccone.org> writes:

Tony> I've made a casual examination, and I can't quite figure out which  component
Tony> creates the body tag.
Tony> Of course I want to be able to set the class, but what I'd really like  is
Tony> for someone to point me to a place where I can read about how to  do this?

I used "methods containing string" on body, and found
WAHtmlRoot >> #writeHeadOn:
which appears to pick up attributes for the body tag from ivar bodyAttrs,
which can be accessed in your app's #updateRoot: by sending #bodyAttributes
to the passed-in root.  This is an instance of WAHtmlAttributes,
so you should be able to call #addClass: on it.

In other words, to your top level component, add instance-side:

updateRoot: root
  super updateRoot: root.
  root bodyAttributes addClass: 'yourBodyClass'.


You should also subscribe to the seaside user list.

Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion

More information about the Beginners mailing list