Site Map Page
Since Zen Cart 1.3.0, a storefront sitemap has been automatically produced. The purpose of this sitemap is to provide visitors with a single place to see all the categories in the store. It’s just another mechanism for your customers to discover what’s in your store.
This site map is produced for the benefit of human visitors, and should not be confused with an XML sitemap, which is produced for the benefit of search engines.
The site map may be accessed at the URL
index.php?main_page=site_map. There is frequently a link to the site map in a store’s footer, header or a sidebox.
Extending the Site Map
You may wish to extend your sitemap if you have customized your site in the following ways:
The easiest way to do this is to
- Copy the file
includes/templates/template_default/templates/tpl_site_map_default.phpto your template (i.e.
- Either add specific references to files (the way
FILENAME_SPECIALSis handled) or add PHP code that creates a list dynamically (either using a database query or a filesystem operation).
If you want to list all the files in the folder, these StackOverflow posts might help:
- Display all files in a directory sorted alphabetically
- Display all PDF files in descending order of upload date