HighDots Forums  

Library Item corrupted by Template FIX

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Library Item corrupted by Template FIX in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
dzash2000
 
Posts: n/a

Default Library Item corrupted by Template FIX - 08-04-2004 , 07:50 AM






I just had Dreamweaver MX2004/Mac do something very nasty to my work - but I
resolved it and want to share the solution along with the problem.

I use Templates throughout my little site. The Templates are loaded with
Library Items. I don?t know about anyone else but this is how I must work if I
am to remain sane.

Today I made a tweek to a Library Item but the updated code was corrupted in
the Template. The Template had ?added? an error that it passed on to the
site?s pages. Very ugly.

The way it?s supposed to work is...the links and paths in the LI are pasted
?as is? into the T and the T passes them on.

This time the T added ?Library/? to every path so that when I previewed a page
based on the T (or previewed the T iteself) and clicked a link - it went
looking for the destination page inside the Library. ?Page Not Found? Central.
Even LI?s that I had not updated were effected. I updated the TopNav bar but
the links on the BtmNav bar were also messed up....the NightmareWeaver effect.

When I check back on the code, the LI was correct but the Template and all
it?s connected pages were not.

If this happens to you try this - In the bad Template, do a ?Find? for
?Library/? ( or ?/Library/ as the case may be), then ?Replace? that added
errant path with nothing - and then update the site pages. Be sure to upload
all the effected pages, Templates, and LI?s to your Testing Server (another
lesson learned the hard way) and then test. I hope this helps someone.


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

Default Re: Library Item corrupted by Template FIX - 08-04-2004 , 08:07 AM






Quote:
I use Templates throughout my little site. The Templates are loaded with
Library Items. I don?t know about anyone else but this is how I must work
if I
am to remain sane.

Using Library items in Templates is not a problem, but is often an
unnecessary redundancy. If you are in this situation, you'd be better off
just using Templates without the Library items.

Quote:
This time the T added ?Library/? to every path so that when I previewed a
page
based on the T (or previewed the T iteself) and clicked a link - it went
looking for the destination page inside the Library.
If you are getting this, then there is something wrong in either your
Template or your Library item. I am assuming you do not have anything in
the Library folder other than the *.lbi files, right? Can you show me the
code in one of your Library items that has given you this problem?

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

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

Quote:
I just had Dreamweaver MX2004/Mac do something very nasty to my work - but
I
resolved it and want to share the solution along with the problem.


Today I made a tweek to a Library Item but the updated code was corrupted
in
the Template. The Template had ?added? an error that it passed on to the
site?s pages. Very ugly.

The way it?s supposed to work is...the links and paths in the LI are
pasted
?as is? into the T and the T passes them on.

This time the T added ?Library/? to every path so that when I previewed a
page
based on the T (or previewed the T iteself) and clicked a link - it went
looking for the destination page inside the Library. ?Page Not Found?
Central.
Even LI?s that I had not updated were effected. I updated the TopNav bar
but
the links on the BtmNav bar were also messed up....the NightmareWeaver
effect.

When I check back on the code, the LI was correct but the Template and
all
it?s connected pages were not.

If this happens to you try this - In the bad Template, do a ?Find? for
?Library/? ( or ?/Library/ as the case may be), then ?Replace? that added
errant path with nothing - and then update the site pages. Be sure to
upload
all the effected pages, Templates, and LI?s to your Testing Server
(another
lesson learned the hard way) and then test. I hope this helps someone.




Reply With Quote
  #3  
Old   
dzash2000
 
Posts: n/a

Default Re: Library Item corrupted by Template FIX - 08-04-2004 , 09:37 AM



Murray -

I am appalled to report that the fix I applied did not stick.
When I opened the site again - the Template was corrupt AGAIN. DW is doing
this on it's own. Here are the 2 files online. You can see how the paths are
wrong and how the error carried over into the pages:
http://www.newpixelcity.com/Library/topBnr_withDate.lbi
and
http://www.newpixelcity.com/Templates/303Template.dwt

This is very disheartening.
TIA your input.
D


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

Default Re: Library Item corrupted by Template FIX - 08-04-2004 , 09:52 AM



Your linking is wrong.

From the topBnr_withDate.lbi file you have this -

<span class="btmlinks"><a
href="index.html">HOME</a>&nbsp;&nbsp;-&nbsp;&nbsp;
<a href="mall.html">The MALL</a>&nbsp;&nbsp;-&nbsp;&nbsp;
<a href="samplesites.html">SAMPLE SITES</a><br>

Note that all of these links are pointing into the same folder as the
Library item. It's no wonder that the Template is including the reference
to the Library folder in your child pages. That's what you have told it to
do.

It's a frank operator error for any link in a Library item to *not* begin
with "../", since all referenced files must be outside the Library folder.

The solution is to remake the links in this (and other) Library items.

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

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

Quote:
Murray -

I am appalled to report that the fix I applied did not stick.
When I opened the site again - the Template was corrupt AGAIN. DW is
doing
this on it's own. Here are the 2 files online. You can see how the paths
are
wrong and how the error carried over into the pages:
http://www.newpixelcity.com/Library/topBnr_withDate.lbi
and
http://www.newpixelcity.com/Templates/303Template.dwt

This is very disheartening.
TIA your input.
D




Reply With Quote
  #5  
Old   
dzash2000
 
Posts: n/a

Default Re: Library Item corrupted by Template FIX - 08-04-2004 , 11:44 AM



Murray. Thanks for your reply.

So that I understand -
When I open a LBI from the Assets/Library, the links will be relative to that
file. That is they will all have "../" in front of the target file name.

But, when this LBI is inserted from Assets/Library into a Template based page,
the links will be resolved automatically and "../"s will be removed as
appropriate?

Then I wonder how I got this far? It all worked until today.
I have purposely not been writing code into blank LBI's. I have been copying
code from "successful " pages into blank LBI's. I would work out the links,
spacing, line breaks, line spacing, font size, etc on an html layout because,
as you know, LBI's have no style link so you never know how things will look if
you just look at it from the LBI design view.

Have I missed something or is there a way to see the effect of CSS as you
build an LBI? What is the correct workflow then? I want to take advantage of
LBI and T but I don't want to layout page elements twice.

D


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

Default Re: Library Item corrupted by Template FIX - 08-04-2004 , 11:55 AM



See below -

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

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

Quote:
Murray. Thanks for your reply.

So that I understand -
When I open a LBI from the Assets/Library, the links will be relative to
that
file. That is they will all have "../" in front of the target file name.
Yes - that's exactly right. That's how it must be (UNLESS YOU ARE USING
ROOT RELATIVE LINKS - in which case they will all look like "/foo.html" -
note the leading slash).

Quote:
But, when this LBI is inserted from Assets/Library into a Template based
page,
the links will be resolved automatically and "../"s will be removed as
appropriate?
No. Think about it. The template page is also saved in a subfolder. So in
the template page, the links would still be prefixed with "../" (subject to
the previously mentioned exception of using root relative links). Once you
have spawned a child page and saved it, then the link will be adjusted
depending on the location of the child page.

Quote:
Then I wonder how I got this far?
It's certainly a mystery to me.

Quote:
It all worked until today.
I have purposely not been writing code into blank LBI's. I have been
copying
code from "successful " pages into blank LBI's.
It's no longer a mystery. This is the culprit. Do not do it this way.

Quote:
I would work out the links,
And you are doing it wrong.

Quote:
spacing, line breaks, line spacing, font size, etc on an html layout
because,
as you know, LBI's have no style link so you never know how things will
look if
you just look at it from the LBI design view.

Have I missed something or is there a way to see the effect of CSS as you
build an LBI?
Sure - use a design-time stylesheet.

Quote:
What is the correct workflow then? I want to take advantage of
LBI and T but I don't want to layout page elements twice.
If you are going to add links ANYWHERE (unless they are external to your
site), always browse to the linked file. Never enter them manually.

Quote:
D




Reply With Quote
  #7  
Old   
dzash2000
 
Posts: n/a

Default Re: Library Item corrupted by Template FIX - 08-04-2004 , 12:35 PM



Thanks a ton for setting me straight.
I'll have to get familiar with Design-Time Style sheets.
D

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

Default Re: Library Item corrupted by Template FIX - 08-04-2004 , 12:36 PM



You're welcome!

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

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

Quote:
Thanks a ton for setting me straight.
I'll have to get familiar with Design-Time Style sheets.
D



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.