relative paths and base

Post your questions and problem reports here

Moderator: kfury77

Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.
  • Check the Support section of the corresponding product first. Chances are you will find your answer there;
  • Do not create new topics for already reported problems. Add your comments to the existing topics instead;
  • Create separate topic for each problem request. Do NOT post a number of non-related problem reports in a single topic;
  • Give your topic a meaningful title. Titles such as "A question," "Bug report" and "Help!" provide others no clue what your message is about;
  • Include the version number of the software you are using;
  • This is not an official customer support helpdesk. If you need a prompt and official response, please contact our support team directly instead. It may take a while until you receive a reply in the forum;
Post Reply
G-Sun
Posts: 70
Joined: Mon Feb 11, 2013 12:40 pm

relative paths and base

Post by G-Sun »

WeBuilder v12.0

Hi!

How should I deal with relative paths in Webuilder.
I'm using asp-pages and are using includes to build my pages.
The includes needs <base> set (if I'm correct) but then all other paths needs relative setting, at least images.

Does WeBuilder have an option for this, making it possible to us e.g. "Update IMG size" ?

As it is I have to manually adjust paths from absolute to relative.

Thanks!
www.g-sun.no/en/
User avatar
Aivars
Blumentals Software Developer
Posts: 2462
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: relative paths and base

Post by Aivars »

If you're using projects then the project root will be considered to be a base (like, if project root is c:\my projects\project 1\
and image path used is /images/image1.gif, then the editor will handle this correctly).
Blumentals Software Programmer
G-Sun
Posts: 70
Joined: Mon Feb 11, 2013 12:40 pm

Re: relative paths and base

Post by G-Sun »

Aivars wrote:If you're using projects then the project root will be considered to be a base (like, if project root is c:\my projects\project 1\
and image path used is /images/image1.gif, then the editor will handle this correctly).
Thanks,
but that's not how I experienced it.
But then, my <base> -tag is set in an included file in my page head.
WeBuilder doesn't support any includes regarding this does it?
But, you're saying that if I put it in my page, and not in the include, WeBuilder will handle this correct?

Thanks!
www.g-sun.no/en/
G-Sun
Posts: 70
Joined: Mon Feb 11, 2013 12:40 pm

Re: relative paths and base

Post by G-Sun »

Checking, for inserting image:

Unsaved file gives absolute path file (file://my Computer/My Project/images/image.jpg)
Saved in folder file gives relative path (../images/image.jpg)
Saved in folder with <base> set gives me relative path (../images/image.jpg)

The problem with the last one is that the browser need this path ( /images/image.jpg)
else it doesn't find and display the images.

I need the <base> setting for js/asp/css files to be loaded correctly when having files in different folders.

Of course I can manually edit image-paths, but it would be nice if WeBuilder could deal with it.

Thanks!
www.g-sun.no/en/
Post Reply