[PHPTAL] PHPTAL: image href
dutz dutz
dutzwork at yahoo.com
Wed May 10 15:19:44 CEST 2006
Well i just figured that might be the sollution.
I think there should be some path translation
implemented in phptal(for href, src etc) at parse
time.
I'm realy new to phptal and i can only imagine the
template file for a page made out of a sliced image...
Every piece of image slice using tal:attributes
although it's a static image. IMHO if i receive a
template from the designer i should only have to worry
about the dynamic things in the page and not care
about the static stuff like images, css, etc.
But I guess that's it and we'll have to deal with
it....
Best regards,
-=dutz=-
--- Stephan Lo <stephan.lo at uprix.de> wrote:
> dutz dutz schrieb:
>
> Hi,
>
> in your presentation logic:
>
> $tpl->imgPath='tpl';
>
>
> in your template:
>
> <img tal:attributes="src
> string:${imgPath}/images/pic.jpg"
> src="images/pic.jpg" />
>
> yours
>
> stephan
>
>
> > Hi
> >
> > How do i load an image into a PHPTAL template
> using
> > rel paths so that it's visible in both template
> and
> > php script. Dir structure is something like:
> >
> > ./index.php
> > ./tpl/page.html
> > ./tpl/images/pic.jpg
> >
> > if i use <img src="images/pic.jpg" /> the image is
> > displayed ok in template but running index.php it
> > displays only an image placehoder
> >
> > Thanks a lot
> >
> > -=dutz=-
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> >
> > _______________________________________________
> > PHPTAL mailing list
> > PHPTAL at lists.motion-twin.com
> >
> http://lists.motion-twin.com/mailman/listinfo/phptal
> >
> >
> >
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the PHPTAL
mailing list