Re: [PHPTAL] Template folder problem

2009-03-27 Thread Levi Stanley
Well, while designing my framework, I wanted it to be able to change
designs pretty easily, but also allow fast transition from design to
production.  So what I ended up doing is using a prefilter to change the
html to point where my images were for that design, so the only hard
line you have to set for your designers is he has to put all of his
images into the images directory, he can make the directory structure
however he wants from there.

So you have a "images/menu-bar/home.png" my framework's prefilter
changes that to "layouts/101/images/menu-bar/home.png"

my framework supports different templates so the 101 stands for that.

Best regards,
Levi

Daniel Lima wrote:
> Hi,
>
> Yeah, that is ok! But, if my webdesigner uses a wysiwyg editor (e.g
> Dreamweaver), he won't can see the template like it´s realy because
> stylesheets path´s are relative.
>
>
> On Wed, Mar 18, 2009 at 2:30 PM, Kornel Lesinski
> mailto:kor...@aardvarkmedia.co.uk>> wrote:
>
> Not at all. It's best to put PHPTAL templates outside document
> root (where they are inaccessible to browsers). Paths given to
> PHPTAL class are relative to script's current directory, e.g. given:
>
> private/tpl/template.xml
> public/index.php
> public/css/style.css
>
> script in public/index.php will need to use
> PHPTAL("../private/tpl/template.xml"), and template may use
> href="css/style.css" to refer to stylesheets (CSS/JS paths in
> templates are relative to page URL that browser sees).
>
>
> -- 
> Daniel Lima
> Web Developer
> 
>
> ___
> PHPTAL mailing list
> PHPTAL@lists.motion-twin.com
> http://lists.motion-twin.com/mailman/listinfo/phptal
>   

___
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal


Re: [PHPTAL] Template folder problem

2009-03-27 Thread Tjerk Meesters
I would solve this problem by making paths to javascript, css and
images absolute (i.e. /js/script.js)

This avoids any issues with relative paths in html but also in css
(referring bg images for instance)


On 3/27/09, Daniel Lima  wrote:
> Hi,
>
> Yeah, that is ok! But, if my webdesigner uses a wysiwyg editor (e.g
> Dreamweaver), he won't can see the template like it´s realy because
> stylesheets path´s are relative.
>
>
> On Wed, Mar 18, 2009 at 2:30 PM, Kornel Lesinski > wrote:
>
>> Not at all. It's best to put PHPTAL templates outside document root (where
>> they are inaccessible to browsers). Paths given to PHPTAL class are
>> relative
>> to script's current directory, e.g. given:
>>
>> private/tpl/template.xml
>> public/index.php
>> public/css/style.css
>>
>> script in public/index.php will need to use
>> PHPTAL("../private/tpl/template.xml"), and template may use
>> href="css/style.css" to refer to stylesheets (CSS/JS paths in templates
>> are
>> relative to page URL that browser sees).
>>
>
> --
> Daniel Lima
> Web Developer
>


-- 
--
Tjerk

___
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal


Re: [PHPTAL] Template folder problem

2009-03-27 Thread Daniel Lima
Hi,

Yeah, that is ok! But, if my webdesigner uses a wysiwyg editor (e.g
Dreamweaver), he won't can see the template like it´s realy because
stylesheets path´s are relative.


On Wed, Mar 18, 2009 at 2:30 PM, Kornel Lesinski  wrote:

> Not at all. It's best to put PHPTAL templates outside document root (where
> they are inaccessible to browsers). Paths given to PHPTAL class are relative
> to script's current directory, e.g. given:
>
> private/tpl/template.xml
> public/index.php
> public/css/style.css
>
> script in public/index.php will need to use
> PHPTAL("../private/tpl/template.xml"), and template may use
> href="css/style.css" to refer to stylesheets (CSS/JS paths in templates are
> relative to page URL that browser sees).
>

-- 
Daniel Lima
Web Developer
___
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal


Re: [PHPTAL] Template folder problem

2009-03-18 Thread Kornel Lesinski

On 18 Mar 2009, at 16:55, Daniel Lima wrote:


The script run normaly, but wihout images, css, js, etc...
Am I obliged to put "TPL" folder to "ADMIN" root directory?


Not at all. It's best to put PHPTAL templates outside document root  
(where they are inaccessible to browsers). Paths given to PHPTAL class  
are relative to script's current directory, e.g. given:


private/tpl/template.xml
public/index.php
public/css/style.css

script in public/index.php will need to use PHPTAL("../private/tpl/ 
template.xml"), and template may use href="css/style.css" to refer to  
stylesheets (CSS/JS paths in templates are relative to page URL that  
browser sees).


--
regards, Kornel


___
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal


[PHPTAL] Template folder problem

2009-03-18 Thread Daniel Lima
Hi,

I have the follow folder structure

-- /admin
  /modules ->  php code
  /tpl -> template directory
 -- /js
 -- /css
 -- /img
 -- /css
 -- /macros
 -- index.html
  index.php ->  PHPTAL('tpl/index.html');

The script run normaly, but wihout images, css, js, etc...
Am I obliged to put "TPL" folder to "ADMIN" root directory?

My first post!
PHPTAL is amazing.

Regards,
-- 
Daniel Lima
Web Developer
___
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal