What's an easy way to dynamically generate some JavaScript in Seaside? -
i'm trying add disqus blog i'm writing. deal seaside sessions need either add unique discus_identifier or disqus_url js. overrode component's #script method can return string literal.
i see 2 options:
- dynamically generate js, save file, , load file in component.
- add permalink each blog entry.
is there easier way? or 1 (or both) of these ways easy do? i'm new smalltalk , seaside , unsure how accomplish either of these 2 things.
yes there easier way. can generate correct discus js code directly in #script method. should return string literal can create string on fly. example using writestream.
you blog entries need permalink. can use #initialrequest: method handle these permalinks.
Comments
Post a Comment