Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.


Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Sitemap Tutorial Problems - Blank Site Map


8 Posts   2954 Views


30 July 2008 at 9:10pm Community Member, 12 Posts

Newbie alert...

Just setting up a site

Following the sitemap tutorial

Got to:
Look mum, a site map!

but there isn't one!!!

Just a blank space where it should be?

Changing the stylesheet changes the heading "Site Map" but no list of pages...

How do I find out where the error is in I assume my SiteMap.php?


30 July 2008 at 10:42pm Forum Moderator, 5511 Posts

have you created a page type of 'Site Map' in the CMS? Have you got the $SiteMap in your template file?


30 July 2008 at 11:30pm Community Member, 12 Posts


Page is here

Currently in /mysite/templates/layout

<div class="typography">
   <% if Level(2) %>
       <% include BreadCrumbs %>
   <% end_if %>


31 July 2008 at 8:24am Forum Moderator, 5511 Posts

Ok well the only PHP error I see is Notice: Undefined variable: rootLevel in /home/nzyg/web/ on line 24 - dont know if that should be there or if somethings not right.

Looking at the code I think the problem is

$rootLevel = DataObject::get("Page", "ParentID = 0"); // Pages at the root level only

I dont think it is returning any objects. Hence why their is not code outputted. if($rootLevel) fails then it doesnt even get to that stage. Try add a die('test') inside the if($rootLevel) {} and see if it dies with test - If im correct it won't it will skip that if entirely. Now the question is why..


31 July 2008 at 10:21am Community Member, 12 Posts

Okay cool I figured out how to debug code on the remote server. (For any other newbies)
append ?isDev=1 to url.

Okay fixed that problem.

Now can't see any errors using the above

But still blank...

I can't understand this now works on my test site on my local machine but not on remote site.


2 September 2008 at 12:04pm Community Member, 7 Posts

I am having exactly the same problem. Any insights to solving the issue would be appreciated.



2 September 2008 at 10:12pm Community Member, 12 Posts

Still haven't resolved this issue myself but haven't had time to spend working through this issue recently.


12 October 2008 at 1:48am Community Member, 37 Posts

Nice !!!
Checked the docs about, create one. Also there was a nice CSS code on tutorial.
But I dont know how to apply the given CSS code to the sitemap. Where or which file needs to edit?

Thanks for your reply in advance