dreamweaver training course - linking pages

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Dreamweaver Training and help » dreamweaver training course - Linking pages

dreamweaver training course - Linking pages

resolvedResolved · Low Priority · Version Standard

Antonia has attended:
Dreamweaver 8 Introduction course

Linking pages

what is the easiest way to link the pages when you are creating 100+ pages; by using folders or is there another way?

RE: linking pages - PHP script link to all files in a directory

Antonia,

In the past, I have written a bit of PHP script to link to all pages in a folder. You will need to have PHP installed on your web server or hosting environment for this code to work. Alternatively, if your hosting environment hosts ASP pages, you may be able to locate similar code written in ASP.

I'm not sure of any way Dreamweaver can create a site-map for you. You could try searching google for dreamweaver create sitemap but most of the sites found seem to only create a graphical sitemap or an XML sitemap for 'Google sitemaps'.


<?php
function list_dir_contents ($the_path) {
global $DOCUMENT_ROOT;

// opens the directory, and creates a data source handle
$handle = dir($DOCUMENT_ROOT.$the_path);

// go through each file, assigning filename to $file variable
while ($file = $handle->read()) {
// exclude the two . and .. files
if (($file != ".") and ($file != "..")) {
print "n<br />";
print "<a href="/$the_path/$file">$file</a>";
}
}
}

// eg. this will list the files in the 'newsletter' folder
// (assuming one exists in your web site root folder)
list_dir_contents("newsletter");

?>


Hope this helps,
Regards, Rich

 

Training courses

 

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Dreamweaver tip:

Xhtml vs html

When using dreamwear template or just creating a blank webpage, you are able to select the markup language you want to use. The main choices are either xhtml or html. It is now best to select xhtml as this will translate all the html into xml, so it is transmitted across the web in xml format. One of the main advantages of this is that it makes the site that you build much more compatible with the range of different web browsers that exist.

View all Dreamweaver hints and tips


Server loaded in 0.09 secs.