Jump to content

PHP, Lnking and possibly a silly question

Recommended Posts

<div id="sectionLinks">

<h3>Section Links</h3>


<li><a href="Page1.htm”>Page1</a></li>

<li><a href="Page2.htm">Page 2</a></li>

<li><a href="Page3.htm">Page 3</a></li>

<li><a href="Page3.htm">Page 4</a></li>

<li><a href="Page3.htm">Page 5</a></li>

<li><a href="Page3.htm">Page 6</a></li>




<div class="relatedLinks">

<h3>Community Links </h3>


<li><a href="tellafriend.php">Tell a friend</a></li>

<li><a href="help.htm">Need help?</a></li>

<li><a href="donate.htm">Please Donate</a></li>




Hello, quick question…


The above is a section from my site, it makes up the links found down the left hand navigation column. As there are an ever-increasing number of pages, but all of them share this code in common.


I assume that there is a way of calling the links from an external file so that I can change just one file and have the changes cascade across the site.


How do I format the text for both the lines of code to call in the external links and how do I format the lines of code in the external file?


And lastly will any of this be affected by being used on HTML and PHP pages???



Link to comment
Share on other sites

If you are making your site in PHP then this should work wonders:

<?php include(includes/nav.php); ?>

With nav.php being a page that holds all of your nav links. Alternatively, you could go to the HTML area on the Insert bar and select "Include File" and select an HTML file for a pure-HTML solution.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.