PDA

View Full Version : How do i edit 1 page and all other pages are edited?



slimeredr
August 31st, 2001, 13:34
I know I've seen it where instead of editing all your files you edit 1 and they all change. I just don't know where to find it and i don't know how to set it up PLEASE HELP ME I planning to move my site and I dont want to do this manually.

webspaceseeker
September 6th, 2001, 20:06
You have to use templates.

bigperm
September 6th, 2001, 20:41
It's easy really... there are two easy ways to do it.

#1 Make a template in dreamweaver, and make all of your pages off of that.

#2 If you don't have dreamweaver, you make one page that you want your entire site to look like. Split that in half, into a header and a footer.

Then you use php or SSI to include that header and that footer on every page.

webspaceseeker
September 6th, 2001, 20:55
provided youre using PHP:

#3: if different people design a page then use variables for the page title etc ($title="...", $menu="...") and insert them into the template page.

#4: if you update only small portions of your site frequently, then use an element file for that portion like
<? include("lastupdate.tpl"); ?>

If you cannot use php, but ssi then use #2 or #4. Basically they are very similar if not the same.

LeX
September 7th, 2001, 07:36
There's a little program for Windows called BK ReplaceEm, search for that at download.com

What it does is search/replace the content of files you appoint, really fast and it works!

slimeredr
September 7th, 2001, 14:22
thankx alot hopefully it will work I test it and see what happens
:D

Canuckkev
September 8th, 2001, 21:04
Originally posted by LeX
There's a little program for Windows called BK ReplaceEm, search for that at download.com

What it does is search/replace the content of files you appoint, really fast and it works!

That's what I was going to say!!!! There are others like it. Look for batch find/replace. Some free html editors will have it too, like 1st page.

slimeredr
September 9th, 2001, 09:09
Can someone give me easy directions on how to use it. (opening one .html editing it and making all other files change?)

Canuckkev
September 9th, 2001, 12:31
Use bk replace? It isn't that hard...

slimeredr
September 9th, 2001, 14:21
still, I need step by step instructions :rolleyes:

niv
September 9th, 2001, 14:57
idiot... :rolleyes:

just use PHP:

index.php:
<html>
<body>
crap<br>
more crap<br>
<br><br>
place for stuff you want changed:<br>
<?php if ($inc){
include ("$inc.inc"); } else include ("main.inc");
?>
other crap<br>
</body>
</html>

index.php?inc=crap will require crap.inc in the same directory, etc. not too hard to figure out, unless you're really slow :rolleyes:

jon787
September 9th, 2001, 22:08
I use a different method (mine is XHTML)
header.inc:
<!DCOTYPE....>
<html>
<head>
<title><?php echo $title; ?></title>
<meta name="description" content="<?php echo $description; ?>" />
<script type="text/javascript"><!--
blah blah blah
//--></script>
</head>
<body>

footer.inc
<!-- insert my standard footer table here -->
</body>
</html>

file.php
<?php
$title="Title of Page";
$description="Description of Page";
$updated="last updated...";
include("header.inc");
?>
Insert the page here
<?php include("footer.inc"); ?>

Cyber
September 10th, 2001, 06:12
those 2 ways are just reverse of each other. but way #2 is better. what would you save the second way as? PHP, XHTML?

agnieszka
September 10th, 2001, 23:43
if you only want to change things like background colour, font type, and stuff like that (visual/asthetic aspects), i recommend using an external style sheet (css).

much simpler than php, xml, or any programming crap, and you only need to change the one external file, and all the files referencing it change instantly. thus, no need to have headers and menus in ALL your pages, like these other guys have been suggesting.

you don't even need an editor to make it - it's simple enuf to learn from scratch... on par with html.

i love it. i use it. i recommend it.

i just spent about 5min searching for some sites for you to look at if you're interested. i'm not sure how good they are, but most look ok to me...


http://www.w3.org/TR/REC-html40/present/styles.html
http://www.htmlhelp.com/reference/css/style-html.html
http://tech.irt.org/articles/js084/
http://www.pageresource.com/dhtml/indexcss.htm
http://builder.cnet.com/webbuilding/pages/Authoring/CSS/table.html?tag=st.bl.3880.ref_l.bl_table

slimeredr
September 11th, 2001, 13:55
All I need is to change the links in a menu for about 100 pages, I just dont want to do this manually. All those pograms you guys talked about dont work with .html files. Those are the type im using.

agnieszka
September 12th, 2001, 00:00
http://www.editpadpro.com/editpadclassic.html

a program similar to notepad, except you can open multiple pages in it (i've opened up to 500+) and you can make modification in a "find and replace in all pages" option. excellent program.

slimeredr
September 12th, 2001, 17:25
Does it support .html files?

agnieszka
September 12th, 2001, 18:42
it opens practically any file. html, cgi, txt.. i've even opened corrupted doc files and retrieved some text from them....

Oipo
October 16th, 2001, 16:34
I was also looking for a solution to the same problem. Finaly found some solutions.

:classic2: :classic2: :classic2:

Thanks.