body tag in seaside

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

body tag in seaside

Tony Giaccone-2


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



Tony
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: body tag in seaside

Randal L. Schwartz
>>>>> "Tony" == Tony Giaccone <[hidden email]> 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'.

Untested.

You should also subscribe to the seaside user list.

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[hidden email]> <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
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners