Edit one file, that changes the column on all pages.

This is a discussion on "Edit one file, that changes the column on all pages." within the Web Page Design section. This forum, and the thread "Edit one file, that changes the column on all pages. are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Aug 22nd, 2007, 23:20
Junior Member
Join Date: Jun 2006
Location: new jersey
Age: 18
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Edit one file, that changes the column on all pages.

Hi. On my current site, I have a three column layout. I have 30 pages though, and it is a hassle going to each individual page, and changing the columns (adding a new link, renaming,etc.). Could anyone provide code and/or instructions on how to have one file, for each column be like the control. Where I edit that, and it changes the column information on all of my pages? Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Aug 23rd, 2007, 00:12
Elite Veteran
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Edit one file, that changes the column on all pages.

You have a couple of options.
1) if you are using dreamweaver, make a template of one page. Then when you change the template it changes all the associated pages.

2) Php includes: Here is one tutorial. http://www.tizag.com/phpT/include.php
Google "php include" if this one isn't great.

These are great timesavers.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Aug 23rd, 2007, 00:27
Junior Member
Join Date: Jun 2006
Location: new jersey
Age: 18
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Edit one file, that changes the column on all pages.

Quote:
Originally Posted by Lchad View Post
You have a couple of options.
1) if you are using dreamweaver, make a template of one page. Then when you change the template it changes all the associated pages.

2) Php includes: Here is one tutorial. http://www.tizag.com/phpT/include.php
Google "php include" if this one isn't great.

These are great timesavers.
Thank you so much! #2 Worked! This will save me a ton of time in future. Would I be correct in assuming, I could simply make a menu2.php, and have one for the right column as well?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Aug 23rd, 2007, 00:39
alexgeek's Avatar
Moderator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,812
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
Re: Edit one file, that changes the column on all pages.

you can use as many includes in a page as you want
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Aug 23rd, 2007, 00:41
alexgeek's Avatar
Moderator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,812
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
Re: Edit one file, that changes the column on all pages.

Also if you need a certain part included,
replace the word include with require.
that way if that file can not be included, you'll just get an error.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Aug 23rd, 2007, 01:10
Junior Member
Join Date: Jun 2006
Location: new jersey
Age: 18
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Edit one file, that changes the column on all pages.

Thank you for all the help! I really appreciate it!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Aug 23rd, 2007, 01:19
alexgeek's Avatar
Moderator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,812
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
Re: Edit one file, that changes the column on all pages.

rep us then
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Aug 23rd, 2007, 02:44
Junior Member
Join Date: Jun 2006
Location: new jersey
Age: 18
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Edit one file, that changes the column on all pages.

Hi again haha. I did think of one more question. So I read the information about http://www.tizag.com/phpT/require.php Require, instead of Include. Now I don't look forward to going through the 30 pages again and changing include to require, but is it really necessary? The article seems to recommend it, but I am positive that all of my links work and there are no errors (I tested every page) So there should be no problem right? I don't have to change it, if it works fine?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old Aug 23rd, 2007, 02:48
alexgeek's Avatar
Moderator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,812
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
Re: Edit one file, that changes the column on all pages.

It's usually best to do from the start.
Okay right now lets say your page is fine.
but you want to add something?
you go through every page and add it in.
Then a day later, you want something else, you have to change every page. so on so forth.
if you add include/require to every page (next time do it as you go along!)
then you just update the one file.
It's definitely worth it
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10  
Old Aug 23rd, 2007, 02:57
Junior Member
Join Date: Jun 2006
Location: new jersey
Age: 18
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Edit one file, that changes the column on all pages.

Quote:
Originally Posted by alexgeek View Post
It's usually best to do from the start.
Okay right now lets say your page is fine.
but you want to add something?
you go through every page and add it in.
Then a day later, you want something else, you have to change every page. so on so forth.
if you add include/require to every page (next time do it as you go along!)
then you just update the one file.
It's definitely worth it
hmm? I have all my pages set up with the include code, and now I can edit one file, and it affects the part I want it to,on all pages, making it easy. But I read this:http://www.tizag.com/phpT/require.php and it says
"We recommend that you use require instead of include because your scripts should not be executing if necessary files are missing or misnamed."

but Is it worth going back on my pages, and changing the include I previously put, to require? Even though there are no missing files or anything now? And if scripts do execute if necessary files are missing.. how exactly is that bad? I mean it won't like corrupt my files and kill my site? lol...I'd just go rename it?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #11  
Old Aug 23rd, 2007, 03:25
alexgeek's Avatar
Moderator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,812
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
Re: Edit one file, that changes the column on all pages.

sorry misinterpreted what you meant
for what you are doing, no I'd leave it as include.
what they are saying is, say you a have a file that for security's sake has to to be included (for example a script that checks if someone is logged in).
so that if the script that checks if the user is logged in isn't loaded, then the user that is not logged in would not see anything they shouldn't.
Sorry to confuse things with that

straight to the point, don't bother
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #12  
Old Aug 23rd, 2007, 12:51
Junior Member
Join Date: Jun 2006
Location: new jersey
Age: 18
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Edit one file, that changes the column on all pages.

Thanks again!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #13  
Old Aug 23rd, 2007, 20:20
alexgeek's Avatar
Moderator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,812
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
Re: Edit one file, that changes the column on all pages.

Always greatful of rep points
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #14  
Old Aug 23rd, 2007, 20:48
Junior Member
Join Date: Jun 2006
Location: new jersey
Age: 18
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Edit one file, that changes the column on all pages.

haha. I didn't know what you were talking about it.. but I found the button. I did it for both of you.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #15  
Old Aug 23rd, 2007, 20:51
Marc's Avatar
Staff Manager

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Posts: 1,788
Thanks: 0
Thanked 16 Times in 16 Posts
Re: Edit one file, that changes the column on all pages.

I take it the Rep system is working now?
__________________
Marc
Staff Manager - Webforumz.com


Want to be a moderator? PM me.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #16  
Old Aug 23rd, 2007, 20:55
alexgeek's Avatar
Moderator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,812
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
Re: Edit one file, that changes the column on all pages.

still have ti right ckick and oipen in tab
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #17  
Old Aug 25th, 2007, 20:47
alexgeek's Avatar
Moderator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,812
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
Re: Edit one file, that changes the column on all pages.

cheers darkdevik
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
column

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

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