PDA

View Full Version : Help with Find / Replace button title tag contents (text)


anton123
08-14-2008, 08:14 AM
Hi there,

I designed my site with Sitegrinder (Medialab) – Currently all the title tags generated for buttons are the same as the actual html page name.

The problem with this is that the tooltip which appears in browsers when you hover over the button with the mouse gives you the page name. Instead I want to use these tooltips to give the user an indication of what the function of the button is.

An example: A zoom button above an image. Currenty the tootlip says “zoom imagename pagename” – Instead it should say “click here to zoom”.

I need help to get the Dreamweaver Find and Replace tool to batch replace these tags for me for about a 100 pages.

Here is an example of the code:

<body>
<div id="id1zoomimpastooilweddingbutton"><a href="zoomimpastooilwedding.html" title="zoomimpastooilwedding"></a></div>

I only want to replace the text in the title tag - Since the text “zoom” appears several times in the body, I can’t get the Find tool to pick up and Replace the occurrence of “zoom” in the title only…….

Options I’ve tried:

Search Current document: Search for: “specific tag”: “title”, “containing”: “text” = zoom (I’ve tried this with “zoomimpastooilwedding” and zoom[^”]* with no results

I’ve also tried: Search for: “specific tag”: “body”, “containing”: “specific tag” “title” “containing”: “text” = zoom etc……………..

I need help with what parameters to enter in order to find and replace all the text within the title tag with my own text

Thanks very much!

Anton

edbr
08-14-2008, 09:02 AM
you used title="zoomimpastooilwedding" ?

anton123
08-14-2008, 09:23 AM
Hi there,

I use Sitegrinder (not Dreamweaver) to code the site from a Photoshop PSD file. Problem is Sitegrinder automatically inserts the page name into the button's title tag.

The only way I can change the title text on a batch basis would be to use Dreamweaver.....

edbr
08-14-2008, 10:14 AM
ok now im not sure what your question is,still,
use find and replace in dreamweaver. highlight the text i suggested and fill in the text you want to replace it with and select entire site rather than current document

Corrosive
08-14-2008, 10:24 AM
Hi there,

I use Sitegrinder (not Dreamweaver) to code the site from a Photoshop PSD file. Problem is Sitegrinder automatically inserts the page name into the button's title tag.

The only way I can change the title text on a batch basis would be to use Dreamweaver.....

Really you should learn to create a mock up in PS and then how to reconstruct it from the 'ground up' in DW. IMHO you'll struggle doing it with sitegrinder.

anton123
08-14-2008, 10:37 AM
Thanks edbr,

Sorry, let me explain it better:

The page "zoomimpastooilwedding.html" is just one example of about a 100, the pages will all start with "zoom" but will be different after that

more examples:

zoomimpastooilcouple
zoomwatercolorwedding etc.

There are so many that find & replacing these one by one will take too long. If i can get Dreamweaver to batch change all pages that have "zoom" in the title tag and replace all the text in that tag to "click here to zoom"

Thanks again

anton123
08-14-2008, 10:54 AM
Corrosive,

I agree that DW is far better, but believe me when I say I know nothing about coding! So far Sitegrinder has allowed me to create some pretty complex pages (with valid XHTML....). It takes longer, but sure helps webwetnoses like myself.

If only it could do the custom title thing....

C'mon guys there must be a way that DW can do this :-)

Corrosive
08-14-2008, 11:02 AM
believe me when I say I know nothing about coding!

Hi Anton.

That's kind of the beauty of DW. You can start by not knowing any coding and you'll start to understand it after a while. I've heard some good things about Sitegrinder but in DW design view, if you can use PS, you can figure out DW pretty quickly.

Try reading this...

http://www.adobe.com/devnet/dreamweaver/articles/css_concepts.html

Unless anyone else has any suggestions around your problem, Ed's find & replace method is about as good as it gets. DW isn't designed to undo stuff created from other programmes I'm afraid.

davidj
08-14-2008, 11:40 AM
Thanks edbr,

Sorry, let me explain it better:

The page "zoomimpastooilwedding.html" is just one example of about a 100, the pages will all start with "zoom" but will be different after that

more examples:

zoomimpastooilcouple
zoomwatercolorwedding etc.

There are so many that find & replacing these one by one will take too long. If i can get Dreamweaver to batch change all pages that have "zoom" in the title tag and replace all the text in that tag to "click here to zoom"

Thanks again



First select all the pages you want to change in the site by highlighting them in the File panel

If you want to peform the change on every page of your site ignore the above step

with one of the pages open press Ctrl + F

in the find & replace dialogue set the following...

anton123
08-14-2008, 02:25 PM
Thanks David,

I've tried that, problem is that it picks up every tag with the title name in the document - like the top page title and all the other button titles.

I want to be able to change the button title field contents only for a certain button which contains a certain word. So the find needs several levels example

Search for: “specific tag”: “title”, “containing”: “text” = zoom (I’ve tried this with “zoomimpastooilwedding” and zoom[^”]* with no results

I’ve also tried: Search for: “specific tag”: “body”, “containing”: “specific tag” “title” “containing”: “text” = zoom etc……………..

I've tried every available configuration - it's almost like this just can't be done?! Which is hard to believe if you look at all the variables available in the find function......

davidj
08-14-2008, 02:41 PM
just tried this and it works

anton123
08-14-2008, 03:15 PM
Thanks David,

For some reason mine's not working? - see attached screenshot and the actual html file if you wanted to try on that side

davidj
08-14-2008, 03:31 PM
are you sure the page your trying to change contains the correct text to replace

your zipped .htm file contains the following...


<title>Youart Paint Impasto oil</title>


so using the method as i have explained would not find any match and therefore not work

davidj
08-14-2008, 03:42 PM
if you want to change every page you need to change the setting ...

Find In: from Current Document to Entire Current Local Site or Selected Files in Site depending on if you only have a few changes

anton123
08-14-2008, 03:44 PM
Thanks David,

Sorry, I've since learned it called the "title attribute" - see in red below:

<body>
<div id="id1zoomimpastooilweddingbutton"><a href="zoomimpastooilwedding.html" title="zoomimpastooilwedding"></a></div>

davidj
08-14-2008, 03:56 PM
right so just change the tag to 'a' and attribute to 'title'

anton123
08-14-2008, 04:17 PM
Almost there!,

With tag to 'a' and attribute to 'title': it highlights the whole tag, so It needs to go one level further.

I've tried

tag to 'a' and attribute to 'title' = (equals) zoom[^”]* - it then still highlights all the a tags that have title in them (finds 5 of them)

Also, one level down

"containing" "text" zoom[^”]* - no results

(I've also tried the whole word "zoomimpastooilwedding" just in case the reason for no results could be the wildcard)

davidj
08-14-2008, 04:37 PM
I've tried

tag to 'a' and attribute to 'title' = (equals) zoom[^”]* - it then still highlights all the a tags that have title in them (finds 5 of them)

ok

i thought this is what you want

you want to change all that match the expression and replace with some other text