I want to create a site map that is, essentially, a subset of the actual site map. That is, I want to have a regular site map but I also want to create a site map that only lists article pages.
I searched the forums and thought I had found the answer. I copied sitemap.php into articlemap.php and changed the following:
class ArticleMap extends Page {
...
function ArticleMap() {
$rootLevel = DataObject::get("ArticlePage", "ParentID = 0");
...
<ul id="articlemap-list">';
...
I rebuilt the database and added $ArticleMap to ..\layout\page.ss right underneath $SiteMap. The site map works fine but the article map comes up empty. I am not a programmer but can usually figure out what scripts and other code is trying to do. Should I have left the function name as SiteMap? What did I miss?
I would also like to know if, once I get it working, it is possible alphabetize the output. Because of the way I have the article holders set up, it will (to the best I can figure) create several blocks of alphabetized lists.
My site map is at http://www.unclebubby.com/wavs2/site-map/ if you want to take a look.
Thanks,
Joe