Date: 08/14/01
- Next message: giancarlo pinerolo: "Re: [phplib] auth_doregister is disappeared"
- Previous message: Dr Tarique Sani
email protected>>: "RE: [phplib] general template question" - Maybe in reply to: Philip Strnad: "[phplib] general template question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>>try and keep code out of the templates
I complely agree. Actually, you have no alternative. You can't embed PHP
code into PHPLib templates (AFAIK).
>>Also don't you keep images in a separate directory.
Yes. But, that's not the problem. The problem is that all of your images are
relative to the PHP page and NOT the template. So if the template is stored
in a templates directory above the PHP file, it would have to relatively
reference the images directory like so (in order to be able to display
properly in a GUI):
../images/smile.gif
But if you do that, then when the PHP file loads the template, the image tag
will be pointing to the wrong place (an images directory one level beneath
the PHP file). If, on the other hand, you store the template with the
corresponding PHP file then relative paths will always be accurate.
-----Original Message-----
From: Dr Tarique Sani <tarique <email protected>>
[mailto:tarique <email protected>]
Sent: Tuesday, August 14, 2001 11:03 AM
To: Brian Popp
Cc: 'Tarique Sani <tarique <email protected>>'; Phplib (E-mail)
Subject: RE: [phplib] general template question
On Tue, 14 Aug 2001, Brian Popp wrote:
> politically correct answer. The REAL answer is that keeping templates in a
> templates directory messed up the the relative paths in my GUI and kept my
A sincere advise - use sed to search replace in such cases
Also don't you keep images in a separate directory.
Well using GUI is not a sin - my designers thrive on DW
Two of my programmers use PHPed + DBG Debugger + winCVS but I prefer good
old joe and at times nexidion
It is a matter of choice.
However comming back to the point - try and keep code out of the templates
:-)
Tarique
--
=========================================
B2B Application Providers
http://www.sanisoft.com
Vortal for Nagpur http://nagpurcity.net
=========================================
--
Abbestellen mit Mail an: phplib-unsubscribe <email protected>
Kommandoliste mit Mail an: phplib-help <email protected>
- Next message: giancarlo pinerolo: "Re: [phplib] auth_doregister is disappeared"
- Previous message: Dr Tarique Sani
email protected>>: "RE: [phplib] general template question" - Maybe in reply to: Philip Strnad: "[phplib] general template question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

