Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Is there any easier way?
Old 12-04-2005, 07:08 PM Is there any easier way?
Novice Talker

Posts: 5
Trades: 0
Hi,

Recently i need to add a link to my main categories, but i've **** lots of pages,let's say 100. Do i've to open each page in .txt form and add the link?Is there any way i can add a link at the main page and it'll appear on the rest of the page.
davecal is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-04-2005, 07:35 PM
Yak Yak Yak Yak Yak

Posts: 593
Location: Rochester, MN
Trades: 0
In html, not really. You do have some options though.

If you use ".shtml", you can use a file include by adding the following to the page where you want it added:

<!--#include FILE="filename.html"-->

You can even make this a .txt file if you want. I recommend stripping the following tags out of the included file, thus keeping your html more clean, and not confusing the browsers and spiders: head, body, title, and their corresponding ending tags. The downfall to using .shtml's include function is the included file MUST be in the same directory as the shtml file. I am pretty sure there isn't a way to direct the include function to another directory.

I would recommend using php for this though. PHP has a better include function.

You can leave your html alone, but make the following changes to each page:
Change the file extension to .php.
Put the following code in wherever you want the contents of the included file:
PHP Code:
<? include("filename.txt"); ?>
If your file is in another directory, you can do either of the following:
- Put an @ sign before the word "include", so it would say @include, then put the url to the file, so it would look like this:
PHP Code:
<? @include("http://www.yoursite.com/includes/filename.txt"); ?>
A better option is to use the $DOCUMENT_ROOT function.
To use this, you simply replace the domain name with $DOCUMENT_ROOT . (the . should be there), and continue with the path to the file. So, I think it would look like this:
PHP Code:
<?
include($DOCUMENT_ROOT "/includes/filename.txt"); ?>
Using the include function allows you to change every page where the included file is used, by simply changing the included file, and uploading it.
__________________

Please login or register to view this content. Registration is FREE
neorunner is offline
Reply With Quote
View Public Profile
 
Old 12-04-2005, 07:35 PM
Yak Yak Yak Yak Yak

Posts: 593
Location: Rochester, MN
Trades: 0
The options presented may take some time to put into effect, but ultimately they save you ALOT of time when you update your site again.
__________________

Please login or register to view this content. Registration is FREE
neorunner is offline
Reply With Quote
View Public Profile
 
Old 12-05-2005, 06:17 AM
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
Trades: 0
Bear in mind that you will need to check with your host to see what sort of server side includes your server supports (if any).

Some other options:
If you use Dreamweaver, it has a Template option which allows you to define a template for a page, and then content regions for that template. You can then create new pages based on that template. When you edit the template, Dreamweaver will go through and update all the child pages for you automatically.

Another option is ASP.NET v2 'Master Pages'. (Again, you will need to check if your host supports this). It's the same idea as dreamweaver templates, except it's handled by the .NET Framework and the pages are compiled server side. So you have a master document, and then content pages. No data is ever repeated - when you call a content page, it places the content inside the master page and serves the result as a single page.
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
Old 12-05-2005, 09:10 AM
funkdaddu's Avatar
Web Design Snob

Posts: 635
Trades: 0
You can find a good text editing app that can search through multiple files and do a search and replace....
funkdaddu is offline
Reply With Quote
View Public Profile Visit funkdaddu's homepage!
 
Reply     « Reply to Is there any easier way?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB 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.18671 seconds with 12 queries