PDA

View Full Version : Changing multipule links site wide, Help!!!


Gary
09-28-2008, 05:26 AM
Hi Guys

I have an issue that I really hope somebody can help me with.

I have redesigned a website for a client that has about 1500 pages to it, I need to change multipule links to one link. The links in question originally all went to a page that dynamically calculated a price based on a product code.

I need to change all these links to a simple mailto link.

The links I need to change look something like this:

../../quote.php?id=301
../../quote.php?id=462
../../quote.php?id=301

and as I said I need these to all change to a mailto link, is there a way to do this. Any help with this would be much appreciated and will save me days of painful work.

Thanks in advance

Gary

wildsue
09-28-2008, 10:33 AM
Hi Gary
Try this within Dreamweaver:
mark 2-3 pages and go the the find-and-replace dialog (Ctrl+F),
Change the Search to "specific tag" and look there for the a-tag with piece of your old link-text like "quote.php?id=", which you have in every old link you are looking for.
Now put in the replace field the set-attribute to "href" and write there your new mailto-text. If you have to change more than only the href you must look here for the convenient possibilities.

Try this out with your 2-3 pages and if everything is ok - you can change folder by folder or the whole website.
If not: Ctrl +Z for undo to the rescue!

Hope this will help you!
Greetings and good look for your big project!

Susanne

TORCH511
09-28-2008, 11:19 AM
I think the problem is with the variables that are being passed in the links (?id=###) I know you can use expressions to search for wildcards, but I could not get it to work in DW like I would in Access, VB or Excell. You can still use the find and replace tool to find the start of the link, and then manually select and replace the text which would still be faster, but I could not come up with any way that I would trust to do over such a large site.

wildsue
09-28-2008, 11:24 AM
Important note:
Before trying out the find-and-replace-function as described, please make a backup of the files!
When you use the find-and-replace with files not opened, the undo will most probably not function!

Susanne

Gary
09-28-2008, 06:03 PM
Thanks for all the help guys, I found a solution to this issue

Just thought you might find this interesting/useful.

I did a find and replace on

../../quote.php?

and replaced it with

mailto:sales@mydomain.com?subject=Quote Request

This replaced the link but added the variable number ie 123 to the end of the subject, so instead of the email subject being Quote Request it is Quote Request123 (Link = mailto:sales@mydomain.com?subject=Quote Request123.

Not the most tidy solution I know, but it does the job and gets me out of a whole.

Once again thanks for the help

Cheers

Gary