[Grok-dev] Re: More Tutorial Feedback

Noah Gift noah.gift at gmail.com
Sat Jan 5 18:14:24 EST 2008

On Jan 5, 2008, at 6:07 PM, Martijn Faassen wrote:

> Noah Gift wrote:
>> This is related to the previous email, i.e., ZPT, but the  
>> directions on including javascript are a bit vague:
>> "Pulling in images or javascript is very similar. Just place your  
>> image files and .js files in the static directory, and create the  
>> URL to them usingstatic/<filename> in your page template"
>> Explicit is better than implicit...
>> Does this mean, you need to use the same syntax as for CSS  
>> inclusion,i.e.:   <link rel="stylesheet" type="text/css"
>>  href="http://localhost:8080/test/@@/sample/style.css" />, or a  
>> standard include as in a regular XHTML file.
> If you want to include javascript you do something like this:
> <script type="text/javascript" tal:attributes="src static/ 
> myscript.js" />
> The trick is to use tal:attributes so you can dynamically evaluate  
> path expressions. Then you use the special 'static' name to go into  
> your 'static' directory.
Thanks Martjin!  I was digging through the ZPT manual, and was coming  
up with a blank explicit example.  Also, is there a recommended  
template as of now?  I like Genshi, as I have used it before, but I  
also want to learn the true Zope way, as I am interesting in combing  
Plone 3 and Grok ways of doing things, if that is possible.

I wouldn't mind paying back all the great help with a simple ajax  
tutorial in the next couple of weeks.  At my current rate, I should  
have something done reasonably quick.

> Regards,
> Martijn
> _______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> http://mail.zope.org/mailman/listinfo/grok-dev

More information about the Grok-dev mailing list