Welcome to WebmasterWorld Guest from 35.172.100.232

Forum Moderators: open

Message Too Old, No Replies

utility to change html page titles

     
9:55 am on Jan 18, 2005 (gmt 0)

New User

10+ Year Member

joined:Oct 22, 2004
posts:17
votes: 0


anyone know a quick way to change html titles?

I'd like to change the title to match the file name - simple if it was a php driven site but it's a manual build

what I *really* want to do is take the existing title (all the files have the same html title) and append the filename

does DW have anything like this?

also I'm still looking for a utility to add quotes to: width=99
but without touching any of the other formatting?

10:08 am on Jan 18, 2005 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member 10+ Year Member

joined:Oct 4, 2002
posts:2204
votes: 0


use site wide find and replace

Find: <title> Old title </title>
Replace with: <title> New title </title>

Find: width=99
Replace with: width="99"

You might want to consider renaming each page to better convey the content - SE's like <titles>! ;)

10:28 am on Jan 18, 2005 (gmt 0)

New User

10+ Year Member

joined:Oct 22, 2004
posts:17
votes: 0


Limbo - that's not going to be any use

as I said all titles are the same so sitewide f&c will change them all to something else - it cant append the file name as I need

as for width=99 I'm looking for a generic replacement -there's a large number of width=x, height=y where x and y can be anything, not to mention other tags without quotes

11:05 am on Jan 18, 2005 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member 10+ Year Member

joined:Oct 4, 2002
posts:2204
votes: 0


Sorry Glyphomat. Should have better read your question.

The F&R in DW will not be able to do what you need. You will need something with a little more oomph - jreplace can do this I seem to remember.

1:50 pm on Jan 18, 2005 (gmt 0)

New User

10+ Year Member

joined:Oct 22, 2004
posts:17
votes: 0


thanks Limbo - jreplace is kinda hard to figure out for appending file names -

I found something called WebKitchen - a DW extension but only for DW4 - might have to reinstall DW4 to see if it does what it says

8:50 am on Jan 21, 2005 (gmt 0)

Senior Member from US 

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

joined:Feb 12, 2003
posts:1208
votes: 0


You could write a Perl script to do this. And if you don't know Perl -- it's worth learning! :)
12:49 pm on Jan 28, 2005 (gmt 0)

Junior Member

joined:Jan 25, 2004
posts:56
votes: 0


i would handle the width=99 problem with EditPlus2.
it's a lite alternative to UltraEdit.

find: height=([0-9]+)
replace: height="\1"

----
if you're dealing with the precent sign..use this.

find: height=([0-9]+)%
replace: height="\1%"

-------
which means:
find where height equals a character in the range 0-9 ...the [ ] means character in range...1 or more times...the + means one or more times.. and store this value as the first variable... \1

replace it with HeightEquals"value of variable 1"

make sure the Regular Expression check box is checked and, if you want to change all open files, click All Open Files.

4:07 pm on Jan 28, 2005 (gmt 0)

New User

10+ Year Member

joined:Oct 22, 2004
posts:17
votes: 0


I'll try that thanks

I should be able to learn perl (I guess) as I use php

I half tried 'html tidy' and HabTidy which are front ends to a cmd line thing called 'tidy' but got distracted so gave up

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members