Welcome to WebmasterWorld Guest from 18.104.22.168
Forum Moderators: open
We are working on a project where out clients server setup uses root specific linking. For example, an image link would look like:
Where the folder "website" resides in the (web) root directory.
I am trying to find a way that will allow us to recreate this in Dreamweaver, so that our code is ready to ship over directly (as opposed to searching and replacing in the link structure).
Has anyone every done this? Or know how to do this?
All help/suggestions greatly appreciated!
Does that make sense? Maybe I'm misunderstanding your question...
That makes perfect sense! ;)
It's the "../" I want to eliminate.
For example, if I am in a folder called pages (/website/pages/) and I want to link to an image in my images folder (/website/images/), normally I would use:
However, in my root specific environment I want to use a link structure like this:
Does that make sense?!? It is this sort of linking convention that I wish Dreamweaver to adopt.... if possible!
NOTE: I've got a toggle set in my DW settings to Not Change Code. I forget exactly where it is - somewhere in the site setup settings. I'm not sure what happens if you don't have that set.
It also adds those blasted ".." things to SSI's, so keep an eye on that, too, if you're using them.
We use (almost exclusively) root-relative, and my biggest beef with DW and this setting is that it's not 'sticky' and keeps resetting to doc. rel by default.
Thanks for the replies. I've found a way to do this.
Once you have a site definied in the Sites pane, applying a root-specific linking convention is quite straight forward (it took some creative search terms on the Dreamweaver help file!).
When you are using the WYSIWYG to insert images/flash/SSI you need to change the Relative To: setting from Document to Site Root. This will use the proper link (/site/folder/whatever.jpg).
What I need to do now is to create a site on our development server, so that this linking convention works correctly when you go to view the pages. This is straightforward enough in IIS, by using the IIS Manager and defining a new site.
This means, for me, that I by prompting my team to use Relative To: Site Root on all their links, we no longer need to do a global search and replace and our code is ready to ship!
<added>Hey mat, just spotted you post - that's it alright! Thanks a million!</added>