Link to home
Start Free TrialLog in
Avatar of Quik
Quik

asked on

DreamweaverMX changing links AARRGG!

I have built several templates that have several instances of these

<a href="?PageName=PAGENAME>

in them. They work, thats the correct link...It calls an exe that decifers that into a usuable link...thats not the problem.  The problem is, when I create a new page from a template, and save it, it changes that link to

<a href="">

I'm about to kill a sheep in order to appease whoever I pissed off.  Why does it do this?  Help! I dont want to change every link by hand after I save them! I just want dreamweaver to NOT F'ING MESS WITH MY LINKS!

I tried changing the "Format code" prefence not to change code for .html files, but that didnt do anything. It doesnt seem to matter where I save the file, it always changes those links.
Avatar of Zeffer
Zeffer
Flag of New Zealand image

it's got to be the ? doing that..don't know how you can change the source files in DW..
but you could fix each page as you create it..or a whole bunch of new pages at once.. using find and replace.

Ctrl+F

just specify all instances of..<a href="">
and replace with..<a href="?PageName=PAGENAME>



an extra chore but would save on sheep..

Z

Avatar of InnerChild
InnerChild

hmmm would you post the code the Dreamweaver is spitting out cause I can't seem to reproduce it...

LAter
Avatar of Quik

ASKER

Zeffer:I really dont want to find and replace, there are many links like that, and doing it that way for every page would take a VERY long time.

Here is an example line from one of my templates in a non-editable region:

<td align="right" valign="middle" class="head"> &nbsp;//<a href="?PageName=Home" title="back to the homepage">Home</a>&nbsp;/
            <a href="?PageName=contact">Contact Us / </a>

Now when I say New... and go from a template, the code it spits out is correct looking. I put in the data I want to be in the new page, then save it.  After it saves it, it changes that exact line to:

 <td align="right" valign="middle" class="head"> &nbsp;//<a href="" title="back to the homepage">Home</a>&nbsp;/
            <a href="">Contact Us / </a>

Anyone?
you can apply find and replace to the entire site Quik..
so no time at all..try it.

also try this..go into preferences..
edit>preferences>code rewriting..and check..Warn when fixing or removing tags..
see if you can make DW put up a message so you can decline
changes

Z
Avatar of Quik

ASKER

I tried that Warn when fixing tags...It doesnt list those tags as being invalid, so it never tells me its going to change them.

I think the best thing might just be have the links as <a href="XXX?PageName=Home" and then go in and find/replace the XXX with nothing.  Lame.

Anyone else have any better ideas?  Or actually know of a way to stop DW from changing my code?
Avatar of zenlion420
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

PAQ with points refunded

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

zenlion420
EE Page Editor
ASKER CERTIFIED SOLUTION
Avatar of GhostMod
GhostMod
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial