Reply
Generating the title's for alot of HTML pages
Old 05-24-2004, 03:27 PM Generating the title's for alot of HTML pages
Novice Talker

Posts: 5
I'm working with alot of files, and basically just need to know how to take the file name and add it to the title.

The files are like this for example: led_zeppelin-kashmir.html

and I would need it to automatically take the file name and add it to the title so the end result would look like this:

MySitesName.com - Led Zeppelin - Kashmir

Anyone know how to do this?

Another example just in case, would be like this...

Filename: rolling_stones-paint_it_black.html

End result for title of this html file: MySitesName.com - Rolling Stones - Paint it Black
Tabble is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 05-24-2004, 03:45 PM
TheX's Avatar
Skilled Talker

Posts: 99
Location: NYC
I'm pretty sure this is what you are talking about. You need to have PhP installed on your domain host or server, which ever applies, for this particular method to work.

http://www.alistapart.com/articles/keepingcurrent/

Do a page search for:
PHP Code:
<?php $thisPage="About Us"?>
TheX is offline
Reply With Quote
View Public Profile Visit TheX's homepage!
 
Old 05-24-2004, 04:26 PM
Novice Talker

Posts: 5
Hi TheX, thanks for the reply, but I don't think that is what it I'm looking for.

I'm working with over 20,000 HTML files, and because that's so many, it would take forever to give each file a unique title by hand...

The files all are unique though and look like this for example:

beatles-yesterday.html

and basically I would want the title for that page to be MySitesName.com - Beatles - Yesterday

Last edited by Tabble : 05-24-2004 at 04:29 PM.
Tabble is offline
Reply With Quote
View Public Profile
 
Old 05-24-2004, 10:17 PM
TheX's Avatar
Skilled Talker

Posts: 99
Location: NYC
Sounds like you need a content management system like PhP-Nuke or something similar. Those on-line apps store your files in a database, usually MySQL and dynamically load the content; hence your title also.

http://www.opensourcecms.com/ This is one of the best sites I know of to try each flavor out to see what it's all about.
TheX is offline
Reply With Quote
View Public Profile Visit TheX's homepage!
 
Old 05-25-2004, 12:18 AM
cmonkey's Avatar
Ultra Talker

Posts: 268
you could just use a simple PHP script to run through the directories that all your files are in and parse the filenames into whatever you want them to be, the script could then modify the file and change the title tag to what you need it to be, however, there would need to be some standard to the existing filenames. other than that, you should definatly look into MySQL to manage all this content.
cmonkey is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Generating the title's for alot of HTML pages
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12102 seconds with 13 queries