Hi,
I'm trying to create a dynamic site map for a site I developed. The site is run off of a php template named index.php. The site uses two variables to specify the directory and filename to be displayed. A content file is opened and parsed and has a page title printed in one part of the page and the rest of its contents (the body) printed in another portion of the page.
Each section of the site has a local navigation menu with links to each page in the specific area. For instance, the "Resources" section has a file named "local_nav_resources.inc" with links to all of the pages in the Resources portion of the site.
I want to create a dynamic site map by reading each local_nav file and printing the portion of each file containing the links underneath a section heading on the site map page. I can parse each local_nav file with no problems. The question is, how do I insert the parsed text into the site map page? I use the include() function to place the sitemap.inc page into the content area of index.php. Apparently, include() just dumps everything from the file, without interpreting the php statements that print out the parsed data from the local_nav files.
I also looked at the exec() function, but I believe if I use that, the whole file has to be php statements. However, there are only a few statements such as
<?php print("$local_nav_resources"); ?>
mixed in with a lot of HTML. Any ideas?
Thanks for any help!