5 Replies - 1981 Views - Last Post: 21 January 2010 - 04:05 PM

#1 Slice  Icon User is offline

  • sudo pacman -S moneyz


Reputation: 244
  • View blog
  • Posts: 717
  • Joined: 24-November 08

Loading menu from external source?

Post icon  Posted 18 January 2010 - 01:26 PM

Hey guys I'm hoping some of you might be able to give me some advice.

Here is the site I am working on http://home-of-the-ancients.netii.net/

This is just a fun project but I would like to make it easy to maintain.

For the menu on the left side, is there a way I can write it in another html file on its own and the link it to every page? So when adding or removing a page I can just edit one file, instead of all of them.

Is This A Good Question/Topic? 0
  • +

Replies To: Loading menu from external source?

#2 coden4fun  Icon User is offline

  • if(coden4fun.NotTired){ ContinueToCode(); }
  • member icon

Reputation: 27
  • View blog
  • Posts: 696
  • Joined: 27-February 09

Re: Loading menu from external source?

Posted 18 January 2010 - 05:06 PM

Can you give us an idea on what languages besides CSS you're using?

For instance, in ASP.Net you could create a master page where the left navigation could reside.
Was This Post Helpful? 0
  • +
  • -

#3 Slice  Icon User is offline

  • sudo pacman -S moneyz


Reputation: 244
  • View blog
  • Posts: 717
  • Joined: 24-November 08

Re: Loading menu from external source?

Posted 19 January 2010 - 04:40 AM

All I am using is HTML and CSS for the moment. I was hoping for a simple solution, somewhat similar to linking to an external stylesheet.

What would I use to compile or program in ASP.net? and how would I integrate it into the site?
Was This Post Helpful? 0
  • +
  • -

#4 calebjonasson  Icon User is offline

  • $bert = new DragonUnicorn(); $bert->rawr();
  • member icon

Reputation: 209
  • View blog
  • Posts: 989
  • Joined: 28-February 09

Re: Loading menu from external source?

Posted 19 January 2010 - 09:48 AM

If you have the option of php you can just do something simple like this:
<?php
include('side_bar.php');
?>


In the file side_bar.php
<div class="sidebar">
<ul>
<li>menu item 1</li>
</ul>
</div>



In order for this to work your server must have php and both pages must have the .php extension. Regular html code runs normally on these pages.
Was This Post Helpful? 1
  • +
  • -

#5 Slice  Icon User is offline

  • sudo pacman -S moneyz


Reputation: 244
  • View blog
  • Posts: 717
  • Joined: 24-November 08

Re: Loading menu from external source?

Posted 21 January 2010 - 03:45 PM

That worked great! Thanks Calebj!
Was This Post Helpful? 0
  • +
  • -

#6 calebjonasson  Icon User is offline

  • $bert = new DragonUnicorn(); $bert->rawr();
  • member icon

Reputation: 209
  • View blog
  • Posts: 989
  • Joined: 28-February 09

Re: Loading menu from external source?

Posted 21 January 2010 - 04:05 PM

You are certainly welcome.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1