Include File Macro

  • softstor
  • Novice
  • Novice
  • softstor
  • Posts: 29

Post 3+ Months Ago

I have a menu system written in html code that is a large chunk of code. This same menu is used in more than a dozen html files.

Is there an include file macro available, that would allow me to code this menu system in one html file, and then have the other html files just include this code?

This would make it easier to define this menu in only one place.
  • Mas Sehguh
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1853

Post 3+ Months Ago

This can be done with server side scripting or SSI. Or you can preprocess files. There is a document about this at: http://www.allmyfaqs.com/faq.pl?include ... in_another
  • Vladdrac
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 2136
  • Loc: Louisville, Ky

Post 3+ Months Ago

I think that you can write the html in a .txt file and have it included in php (along the lines of what sam hughes stated).

then include like this somewhere in the html document

PHP Code: [ Select ]
<?php require("something.txt"); ?>

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 65 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.