• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 221
  • Last Modified:

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.
0
Quik
Asked:
Quik
1 Solution
 
ZefferCommented:
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

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

LAter
0
 
QuikAuthor Commented:
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?
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
ZefferCommented:
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
0
 
QuikAuthor Commented:
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?
0
 
zenlion420Commented:
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
0
 
GhostModCommented:
PAQed, with points refunded (150)

GhostMod
Community Support Moderator
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now