Developer forum

Forum » Development » File path

Reply
I'm struggling a little with a very simple module - actually it is not so much the module as it is Dynamicweb ;)

The problem is:
    I have a collection of filemanager controls with their folder attribute set to '/Billeder' and their FullPath attribute set to 'true'

When I select a file from the dropdownlist ther's no problem, BUT if I choose to browse for the image, then the path is wrong.

IE. I have another folder (Billeder from before is under /Files/Billeder) under /Files/img and when I choose an image from that folder the filemangere read ../img/<pictureName> that image is not found...

My template looks like this...
...
<!--@HeaderEnd-->
  <img src="Files/<!--@test-->" width="450" alt="" />
<!--@FooterStart-->
...

So I thought - "OK - then maybe I should not insert files in the sorc attribute, nbut that seems to turn the problem around, so that the images from the 'Billed' folder is not found, but the others are.

I'm sure there's a simple solution to this issue, I just can't seem to find it...

Replies

 
Reply
Hello,

The path you get when you select an image from the file manager is relative to the folder you have specified using the "Folder" property. In your case the path is relative to /Files/Billeder (/Files/Billeder/../img/[image_name]).

I would suggest you not to specify the "FullPath" property. In this case in your template file you can write something like

<img src="/Files/Billeder/<!--@test-->" width="450" alt="" />

which will always be valid.

- Pavel

 
Reply
Nice ;)

 

You must be logged in to post in the forum