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.

Archive /

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

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

Sitemap Tutorial Problems - Blank Site Map

Go to End

8 Posts   3455 Views


Community Member, 12 Posts

30 July 2008 at 9:10pm

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?


Forum Moderator, 5523 Posts

30 July 2008 at 10:42pm

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


Community Member, 12 Posts

30 July 2008 at 11:30pm


Page is here

Currently in /mysite/templates/layout

<div class="typography">

<% if Level(2) %>
<% include BreadCrumbs %>
<% end_if %>




Forum Moderator, 5523 Posts

31 July 2008 at 8:24am

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..


Community Member, 12 Posts

31 July 2008 at 10:21am

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.


Community Member, 7 Posts

2 September 2008 at 12:04pm

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



Community Member, 12 Posts

2 September 2008 at 10:12pm

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


Community Member, 37 Posts

12 October 2008 at 1:48am

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