Re: Silva 2.2 Layot: How to
"Luthiger Stoll Benno" <[email protected]> Wed, 2 Jun 2010 09:57:22 +0200
| Newsgroups | gmane.comp.web.zope.silva.devel |
|---|---|
| Message-ID | <[email protected]> |
Dear Sylvain Thanks for your reply. The solution you propose doesn't work for me. When I enter the following statement in my page template: === <p tal:content="layout/static/absolute_url">test</p> === I get the following displayed: http://localhost:8087/silva/my_sites/++resource++silva.core.layout.porto That's not what I expect. I'd rather expect something pointing to my_layout: http://localhost:8087/silva/my_sites/++resource++my_layout Any hints? Benno -----Original Message----- From: Sylvain Viollon [mailto:[email protected]] Sent: Dienstag, 1. Juni 2010 18:03 To: Luthiger Stoll Benno Cc: silva-dev-IAPFreCvJWM6s/[email protected] Subject: Re: [silva-dev] Silva 2.2 Layot: How to On Tue, 1 Jun 2010 17:40:52 +0200 "Luthiger Stoll Benno" <[email protected]> wrote: > Hello all > Hello, > I'd like to develop a layout using Silva 2.2. Great ! > Unfortunately, I stumble over the task to display an image on the > page. The image is my_layout/static/my_image.gif. > What's the html code in the page template to display this image? > > I've tried the following: > <div tal:define="resourcebase request/resourcebase/absolute_url;"> > <img tal:attributes="src > string:${resourcebase}/++resource++my_layout/my_image.gif" /> > </div> > <img tal:attributes="src layout/static/my_image.gif" /> Should work (to test) and would be the optimum (you can traverse on view and layout to static, and locate a resource in it. triggering __call__ on it will give you back the URL to the resource). > PS: The documentation on http://docs.infrae.com/silva/layout/ is not > of much use in this case. > I have the impression, it contains some misleading mistakes. > The document is not complete that's why, work is still required on it (like on many things). Regards, Sylvain, -- Sylvain Viollon -- Infrae t +31 10 243 7051 -- http://infrae.com Hoevestraat 10 3033GC Rotterdam -- The Netherlands _______________________________________________ silva-dev mailing list silva-dev-IAPFreCvJWM6s/[email protected] https://lists.infrae.com/mailman/listinfo/silva-dev
smime.p7s
(application/x-pkcs7-signature, 4.5 KB) - not displayed