HighDots Forums  

Template glitches - bad image linking

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Template glitches - bad image linking in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
KrysiaH webforumsuser@macromedia.com
 
Posts: n/a

Default Template glitches - bad image linking - 07-10-2003 , 03:38 PM






Greetings,

I've recently encountered some strange problems using templates that I've never experienced before. The homepage is temporarily located at the following URL:
http://www.uga.edu/campusgraphics/ORS/glass/index.html
And here's the template:
http://www.uga.edu/campusgraphics/ORS/Templates/glass.dwt

1. Problem with new pages from template:
When I create a new page from a template the page looks fine until I "preview in browser". Once I do this, none of the images appear nor the CSS formatting (see referring URL 1). To remedy this, I have temporarily been selecting MODIFY > TEMPLATES > UPDATE CURRENT PAGE / or PAGES, and once I do this, everything looks [mostly] OK (see referring URL 2). Has anyone encountered this problem and is there a way to fix the template so there is no extra work-around step?

2. Problems with image linking in editable vs. non-editable regions:
In order for images to work properly in my pages, I have to make sure that images are always preceded by "../ "(images inserted are preceded by "/ ", requiring manual input of ".."). When I create new pages, the non-editable regions retain this setting and work fine, but any images located in editable areas revert to "/" in the template, requiring a find and replace to make sure all are set as "../". Any way to avoid this?

3. Importing images results in bad linking:
I have my pages for a glass blowing department site saved in a folder called "glass", and within that is an images subfolder. When I import an image from this folder into an editable region, the linking is incorrect: "/glass/images/filename". To get images to show up, again I must manually change this to "images/filename".

I'm wondering if there is an overall error with my template causing these bad links to occur. Any advice is GREATLY appreciated!



Referring URLs
http://www.uga.edu/campusgraphics/ORS/glass/test1.html
http://www.uga.edu/campusgraphics/ORS/glass/test1-updated.html
http://www.uga.edu/campusgraphics/ORS/Templates/glass.dwt
http://www.uga.edu/campusgraphics/ORS/glass/index.html


Reply With Quote
  #2  
Old   
Alan Ames
 
Posts: n/a

Default Re: Template glitches - bad image linking - 07-10-2003 , 03:49 PM








main issue- your site is defined to a subfolder of the domain. Thus- you
must NOT use Site Root relative links in any pages- because the way your
site defined, dreamweaver has the wrong information on where the site root
really is.


the leading / slash in a link means it's a Site Root relative path.
Hand editing the source isn't a real fix.

this older post should cover the issues-
The sudden conversion of templated pages from using document relative links
to site root relative links is related to putting a new link into the
template that's Site root relative. Upon saving, dreamweaver assumes that's
how all the links should be.

this can often happen when linking to a stylesheet or other external file-
the dialog boxes for them also have the same pulldown for site root
relative/document relative that the image dialog box has, but it may not
have the same setting and might be missed- thus a single inadvertent site
root relative link is made in a template, and suddenly all the child pages
have all their links site root relative--

It can be very sticky to unstick--

this should work if you follow these couple of steps:::

The concept:
need to intentionally put a NEW image into the template that has a Document
relative path. Re-browsing to an image that's already in the page doesn't
fix it.

Open the template file.
Place a NEW image on a page using the Object Palette-->Image button. (or the
Insert bar in DMX)
It has to be a New placement of an image, not re-browsing to an image
previously placed in the file. Just place any image at the top or bottom of
the page- it will be deleted later. You can stick it at the very bottom
someplace where it won't mess up the layout.

When the "browse to file" dialog box comes up, Look at the bottom of the
dialog box for a pulldown-
"Relative To Site Root"
"Relative to Document"
Set that to Document Relative
Place the image.
Save the file.

Okay updating the 'child' files.

Now open the template file and delete the image you just put in-
Save template, and okay updating of 'child' files.
Check pages, check links, and upload changed files to server.

If you never change that setting again, all links you now make will be
Document Relative.

You may have to repeat the steps of inserting a new image, saving, then
deleting it for each template file so the linking style gets reset for each
of them. It's a hassle, but inserting a NEW image into the template is the
only way i know of that will correct this setting.

Saving the templates should take care of root relative links on the pages
that based on templates.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

To change regular pages from root relative to document relative or vice
versa-
Install this extension, and check the documentation in the help button.

relativity from Jason Delgarno

http://home.clara.net/locust-star/relativity.zip

When making links or inserting linked files like css or external .js files,
CHECK what the pulldown for site root or doc relative is set to before
okaying the link.




Quote:
1. Problem with new pages from template:
When I create a new page from a template the page looks fine until I "preview
in browser". Once I do this, none of the images appear nor the CSS formatting
(see referring URL 1). To remedy this, I have temporarily been selecting
MODIFY > TEMPLATES > UPDATE CURRENT PAGE / or PAGES, and once I do this,
everything looks [mostly] OK (see referring URL 2). Has anyone encountered
this problem and is there a way to fix the template so there is no extra
work-around step?

2. Problems with image linking in editable vs. non-editable regions:
In order for images to work properly in my pages, I have to make sure that
images are always preceded by "../ "(images inserted are preceded by "/ ",
requiring manual input of ".."). When I create new pages, the non-editable
regions retain this setting and work fine, but any images located in editable
areas revert to "/" in the template, requiring a find and replace to make sure
all are set as "../". Any way to avoid this?

3. Importing images results in bad linking:
I have my pages for a glass blowing department site saved in a folder called
"glass", and within that is an images subfolder. When I import an image from
this folder into an editable region, the linking is incorrect:
"/glass/images/filename". To get images to show up, again I must manually
change this to "images/filename".
--
Team Macromedia Volunteer for Dreamweaver
Certified Dreamweaver MX Developer



Reply With Quote
  #3  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: Template glitches - bad image linking - 07-10-2003 , 04:01 PM



KrysiaH:

Quote:
1. Problem with new pages from template:
See the next response.

Quote:
2. Problems with image linking in editable vs. non-editable regions:
Open your template page. Remake EVERY link on the page. When you do this,
always use the Property Inspector to BROWSE to and select the target file.
Make sure that this link is DOCUMENT RELATIVE (the default), not ROOT
RELATIVE (evidently, how you are currently set). This setting is sticky so
setting it once should leave it there. Making this simple change will heal
your issues with both of the first two problems you describe, as well as the
last one.

In other words - I have solved all your problems with this simple solution.
To read more about the difference between these link styles (and to convince
yourself that this will fix your problems), go here -

http://www.macromedia.com/support/dreamweaver/ts/documents/site_root_rel.htm

or

http://makeashorterlink.com/?Y223630B


--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.DreamweaverFAQ.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"KrysiaH" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Greetings,

I've recently encountered some strange problems using templates that I've
never experienced before. The homepage is temporarily located at the
following URL:
Quote:
http://www.uga.edu/campusgraphics/ORS/glass/index.html
And here's the template:
http://www.uga.edu/campusgraphics/ORS/Templates/glass.dwt

1. Problem with new pages from template:
When I create a new page from a template the page looks fine until I
"preview in browser". Once I do this, none of the images appear nor the CSS
formatting (see referring URL 1). To remedy this, I have temporarily been
selecting MODIFY > TEMPLATES > UPDATE CURRENT PAGE / or PAGES, and once I do
this, everything looks [mostly] OK (see referring URL 2). Has anyone
encountered this problem and is there a way to fix the template so there is
no extra work-around step?
Quote:
2. Problems with image linking in editable vs. non-editable regions:
In order for images to work properly in my pages, I have to make sure that
images are always preceded by "../ "(images inserted are preceded by "/ ",
requiring manual input of ".."). When I create new pages, the non-editable
regions retain this setting and work fine, but any images located in
editable areas revert to "/" in the template, requiring a find and replace
to make sure all are set as "../". Any way to avoid this?
Quote:
3. Importing images results in bad linking:
I have my pages for a glass blowing department site saved in a folder
called "glass", and within that is an images subfolder. When I import an
image from this folder into an editable region, the linking is incorrect:
"/glass/images/filename". To get images to show up, again I must manually
change this to "images/filename".
Quote:
I'm wondering if there is an overall error with my template causing these
bad links to occur. Any advice is GREATLY appreciated!



Referring URLs
http://www.uga.edu/campusgraphics/ORS/glass/test1.html
http://www.uga.edu/campusgraphics/ORS/glass/test1-updated.html
http://www.uga.edu/campusgraphics/ORS/Templates/glass.dwt
http://www.uga.edu/campusgraphics/ORS/glass/index.html




Reply With Quote
  #4  
Old   
KrysiaH webforumsuser@macromedia.com
 
Posts: n/a

Default Re: Template glitches - bad image linking - 07-10-2003 , 04:22 PM



Thanks so much for the info. Something I didn't mention regarding the site being defined in a subfolder of the domain. I actually have the site created in a separate folder in a site defined as ORSweb, which will be posted to www.ors.uga.edu when the site is complete. Currently I cannot use that url because the current site, located on another server (www.rserv.uga.edu), is being re-routed to the new url. For security reasons only a single administrator can FTP to the new url.

So to resolve this, when I want to post the site in a hidden place, I am copying the folder into my department's website folder, which is defined as CGPweb, a separate site. I don't copy files back to ORSweb from here, I only copy to CGPweb so I can proof online.

This is confusing and convoluted I know. Just wanted to point this out in case it makes any difference. Thanks for your help!



Reply With Quote
  #5  
Old   
Alan Ames
 
Posts: n/a

Default Re: Template glitches - bad image linking - 07-10-2003 , 04:29 PM



the very short down and dirty info==

don't use Site Root relative paths if the site is hosted in a subfolder of a
domain, or is going to be burned to a CD. the links won't work.

If your site has it's own domain, and it's defined so the root of the site
is to the root of the domain; you can use Site Root relative paths. However-
using Document Relative paths will work fine, and will keep 99% of
Dreamweaver users out of trouble 99% of the time.

So- for the site to work in that subfolder where you are currently
previewing live- change all the links to Document relative.
Use the info i gave to toggle the template based pages.
Use the Relativity Extension to take care of regular pages.

Any instance of "/ a leading slash is a Site Root relative path.
Any instance of '/ in a javascript image call is a site root relative path.

Quote:
Thanks so much for the info. Something I didn't mention regarding the site
being defined in a subfolder of the domain. I actually have the site created
in a separate folder in a site defined as ORSweb, which will be posted to
www.ors.uga.edu when the site is complete. Currently I cannot use that url
because the current site, located on another server (www.rserv.uga.edu), is
being re-routed to the new url. For security reasons only a single
administrator can FTP to the new url.

So to resolve this, when I want to post the site in a hidden place, I am
copying the folder into my department's website folder, which is defined as
CGPweb, a separate site. I don't copy files back to ORSweb from here, I only
copy to CGPweb so I can proof online.

This is confusing and convoluted I know. Just wanted to point this out in case
it makes any difference. Thanks for your help!



--
Team Macromedia Volunteer for Dreamweaver
Certified Dreamweaver MX Developer



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.