hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Web Design and Content : Web Design Help
Reply

Forum Jump

Web Design Help

Reply Post New Thread In Web Design and Content Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 10-06-2003, 04:30 PM
pagekeeper pagekeeper is offline
Junior Guru Wannabe
 
Join Date: Sep 2003
Location: London, uk
Posts: 68

Web Design Help


Hi,

I got a problem with a menu/nav bar, i need a way to update the menu from one page instead of going though all the pages changing them individually which obviously is very time consuming, id love to do it in php but i dont know the language so well.

Any Tips on how i could do it?

im really needing this info !

thanks

__________________
Ash.



Sponsored Links
  #2  
Old 10-06-2003, 04:39 PM
tensixteen64 tensixteen64 is offline
Junior Guru
 
Join Date: Apr 2002
Location: Southern Maryland
Posts: 246
What I did on our hosting site is made a PHP include called menu. Then I just put that include on each page. That way I just change the include each time I add or move a page and I don't have to go to each page. The set up was time consuming, but, once it's set up, you are good to go!

Hope this helps,

Sara

__________________
Sara

Sara Nelson Photography Preserving your moments since 1973.

  #3  
Old 10-06-2003, 04:56 PM
pagekeeper pagekeeper is offline
Junior Guru Wannabe
 
Join Date: Sep 2003
Location: London, uk
Posts: 68
cool thanks sara, whats the include sign?

so i build the site menu in the menu.php then add the include where i want it on each page? what if i add a new button will it resize the include? can i have it a fixed size aswell ? wouldnt mind knowing how to do that!

thanks mate

__________________
Ash.

Sponsored Links
  #4  
Old 10-06-2003, 07:27 PM
rrdega rrdega is offline
Web Hosting Master
 
Join Date: May 2003
Location: Heartland, USA
Posts: 733
Speaking for Gadget Girl:
PHP Code:
<?php include('include/header.html'); ?>
Or, from another site I have:
PHP Code:
<?php include('include/navbar.php'); ?>
That latter one, is actually included into a Table, and starts off with a TR Tag, and has other includes within it...

__________________
You've got to accentuate the positive; Eliminate the negative
Latch on to the affirmative; Don't mess with Mister In-Between

-Bob



Last edited by rrdega; 10-06-2003 at 07:32 PM.
  #5  
Old 10-06-2003, 08:48 PM
etogre etogre is offline
Web Hosting Master
 
Join Date: Aug 2003
Location: California, USA
Posts: 581
Here is a good script that will not give any errors if it cannot find the file.
PHP Code:
<?php
$title 
"Index";
@require_once(
'includes/header.php');
?>
Now we put our contents in here!!
<?php
@require_once('includes/footer.php');
?>
Then in header we could add

PHP Code:
<html>
<head>
<link rel="stylesheet" href="styles/main.css" />
<title>Site Name - <?php echo "title"?></title>
</head>
<body>
Which would make a page that has a different title on each page given by the $title variable. Also, all you would need to do to change a layout or add a link to your pages would be to edit the footer and header includes.

Good Luck!

  #6  
Old 10-06-2003, 10:10 PM
VRonline VRonline is offline
Junior Guru Wannabe
 
Join Date: Aug 2002
Posts: 87
wow, the amazing power of php. Much like Mathematics....

  #7  
Old 10-06-2003, 10:14 PM
rrdega rrdega is offline
Web Hosting Master
 
Join Date: May 2003
Location: Heartland, USA
Posts: 733
Ahhh, Grasshopper... You ain't seen nuttin yet!

__________________
You've got to accentuate the positive; Eliminate the negative
Latch on to the affirmative; Don't mess with Mister In-Between

-Bob


Reply

Related posts from TheWhir.com
Title Type Date Posted
actmedia Listing 2014-04-16 03:31:27
ITX Design Launches Service to Help Simplify PCI DSS Compliance Web Hosting News 2013-01-02 10:59:36
Server Sitters Adds Website Design Service for Web Hosts Web Hosting News 2012-12-21 16:57:19
IT Services Firm GlowTouch Acquires Web Hosting Platform Metromojo Web Hosting News 2012-10-10 15:28:50
Web Host ITX Design Offers Higher Commissions for Affiliate Program, Free cPanel Web Hosting News 2012-08-13 18:39:36


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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 Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?