Forum Moderators: mack

Message Too Old, No Replies

Dreamweaver Templates

Made a mistake when putting to remote server

         

zasadaj

8:16 pm on Oct 18, 2007 (gmt 0)

10+ Year Member



Disclaimer: This my first post to this board as well as the first time I've ever tried to publish a site. I'm using Dreamweaver 8.

I put my file on the remote server for the first time and moved items out of the Template folder and deleted the Template folder. Didn't know that was a no-no. Do ALL files created off a template need to reside in the template folder? That will make messy links (e.g. cedarlakein.org/templates/parks.php). Or do the templates themselves only need to be in that folder?

So in trying to undo the damage - I at least recreated the Template folder and put the three templates back in there.

But now I still cannot update the dependent pages. I'm getting an error message. Dreamweaver has combined the location of the files with localhost and remote host into one giant file location that is clearly wrong. I don't know how to fix that. Any advice?

The error message reads...
Error accessing file "C:\\xamp\htdocs\local_sites\CLtown_site\home\towncl\cedarlakein-www\templates\index_css.dwt.php": bad file path (error code 3)

This is the local location: C:\\xamp\htdocs\local_sites\CLtown_site
Whereas this is remote: home\towncl\cedarlakein-www\templates\index_css.dwt.php

Any help would be greatly appreciated.

Thanks,
Julie

BeeDeeDubbleU

7:48 am on Oct 19, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You don't need to worry about the location of templates and they don't have to be on the remote server. Dreamweaver takes care of that. What you cannot do is delete them and when you did so it looks like you dropped the link between the pages and the templates.

There is a permanent link between templates and the pages created from them. This is required so that when a change is to be made globally DW knows which pages it should be updating. If you delete the template this link is broken.

I don't think you can successfully reconnect the pages to the template. What I have done in the past when this happened is recreate all the pages from the relevant template and cut and paste the information from the existing pages into the reconnected pages. This is only really practical if you have a small site.

Perhaps someone else knows a better solution?

zasadaj

12:22 pm on Oct 19, 2007 (gmt 0)

10+ Year Member



Thank you.

That is what I had started to try to do to fix my mess last night (the detach-reattach procedure).

What about this? I'm using .php and seem to be finding that as I move a page from the "templates" folder to the root folder, detach the template, and reattach it to recreate the connection, I am finding that my navigation menu (which is a file used in every template called "quicklinks.php" and is currently stored in the templates folder) doesn't get called at all when I test it on my local machine. It looks like it does...

<div id="navigation"><?php include ("Templates/quicklinks.php");?>
</div>

...but on the screen I get that little white box with the red x in it.

Anyone have any ideas what might be happening wrong here? Should "quicklinks.php" have been saved in the root folder instead of templates folder to begin with? Are some connections to images begin lost?

BeeDeeDubbleU

1:28 pm on Oct 19, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Youy need to get away from the templates folder. The only files that should be in there are template files. Your other webpage files should be in the root folder and subfolders if necessary.

zasadaj

2:59 am on Oct 24, 2007 (gmt 0)

10+ Year Member



Just an update...I ended up discarding my templates and using more PHP inserts to make a template of sorts. Given my skill level, it was the better way to go (quicker and more intuitive). Thanks for your advice.