NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Strange question about HTML preview feature and mapping


Joined: 28 May 2007
Posts: 7
Reply with quote
First of all thanks for your support, I know my request is quite private.

I'm happy owner of PhpED entire suite, solving this issue will make me happier Smile
I'm open to any hint comment.

To better understand my problem I'll explain the tree structure of my projects.

I have several (about 20) php projects with this tree:

Local Side:
1. C:\ProjectName\
2. C:\ProjectName\Online\
3a. C:\ProjectName\Online\httpdocs
4a. C:\ProjectName\Online\httpdocs\images
3b. C:\ProjectName\Online\templates
4b. C:\ProjectName\Online\templates\about

Remote Side:
/var/www/projectname/
/var/www/projectname/httpdocs/ (with subdirs)
/var/www/projectname/templates/ (with subdirs)
and so on...

The document root of my project is:
C:\ProjectName\Online\
Top publishing directory is
/

So every file like
C:\ProjectName\Online\httpdocs\index.php
is mapped to
/var/www/projectname/httpdocs/index.php

Everything works fine.

As you can see I have a templates folder the is OUTSIDE document root
this is for security reason, templates are "rendered" using scripts similar to smarty

A template example is
C:\ProjectName\Online\templates\test.html
with something like
Code:

<img src="images/imagename.jpg">

the template is read by, for example, by mywebsite/test.php

When the page is rendered server side it works ok because
images/
resolves to
/var/www/projectname/httpdocs/images/

When I preview test.html using PhpED it will not work (and I know that it is right) because
images/
resolves to
file:///C:/Documents%20and%20Settings/User/Local/images/

or at least to
file:///C:/images/
or
file:///C:/ProjectName/Online/templates/images/

What I desire is that it resolves to
file:///C:/ProjectName/Online/httpdocs/images/

Is there any way to do this mapping?

I know that this is a special request, and it only would be useful for preview window.

But this feature is very useful so my htmlers (template makers) could use PhpED instead of Dreamweaver or others.

Thank you for reading all my post, I hope I was able to explain correctly, please ask if you need more informations.

Regards.
View user's profileFind all posts by adm.admSend private message
Guru master

Joined: 05 Jul 2004
Posts: 660
Location: Belgium
Reply with quote
If you are running NTFS on your local drives, download "junction" from sysinternals. With it you can create symlinks between folders. A default program (and or a webserver) does not notice the difference between a junction and a real directory, and you can still keep your templates in the separate folder.
I use it all the time to solve that kind of situations.
Hope that helps!
View user's profileFind all posts by BlizzSend private messageVisit poster's website


Joined: 28 May 2007
Posts: 7
Reply with quote
Wonderful hint, thank you very much, I'll try

Is there any way to have the preview not in windows folder?
View user's profileFind all posts by adm.admSend private message
Guru master

Joined: 05 Jul 2004
Posts: 660
Location: Belgium
Reply with quote
Isn't that an option that you have to configure in your templating system, where it renders the previews ?
View user's profileFind all posts by BlizzSend private messageVisit poster's website
Strange question about HTML preview feature and mapping
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic