[Seaside] Newbie questions
Julian Fitzell
seaside@lists.squeakfoundation.org
Tue, 13 Aug 2002 11:47:47 -0700
Pablo Iaria wrote:
> Hi all,
> I'm testing Seaside and I found it very powerfull and easy to use.
> However I have a couple of questions.
>
> Here I go:
>
> 1) If I have:
> Test>html
> ^'<img src="image.gif">'
>
> where should I put the file "image.gif" to get it displayed on the
> browser ?
The easiest thing to do is:
html
^ '<img src="resource/image.gif">'
and then set a Document Root in the config page for your app.
resource/* triggers an action that looks up the document root and pulls
the file in from that directory.
> 2) I have a jsp/asp background (and a little of zope) and I found that is
> much easier to write html code outside Squeak. Is there a way to use file
> based templates ? (I saw the class IAFileTemplate but I couldn't figure out
> how to use it).
Yup, in your component, overide #template something like this:
template
template ifNil:
[template := IAFileTemplate new file: 'foo.html'.
self addHandlers].
^ template
Avi changed the handler stuff while I was on vacation and I've been
working on Seaside 2 since I got back but I *think* that's right.
> Thanks,
> Pablo.-
>
> PS 1: Sorry for my English, it's not my natural language.
Seems pretty darn good to me :)
> PS 2: I'm looking forward to see Seaside 2 !!
So are we! ;)
--
julian@beta4.com
Beta4 Productions (http://www.beta4.com)