17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 2635 Views |
-
Sitemap Tutorial Problems - Blank Site Map

30 July 2008 at 9:10pm
Newbie alert...
Just setting up a site
Following the sitemap tutorial
(http://doc.silverstripe.com/doku.php?id=tutorial:site-map)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?
-
Re: Sitemap Tutorial Problems - Blank Site Map

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?
-
Re: Sitemap Tutorial Problems - Blank Site Map

30 July 2008 at 11:30pm
Yes,
Page is here
http://www.younggreens.org.nz/site-map/
Currently in /mysite/templates/layout
SiteMap.ss---
<div class="typography">
<% if Level(2) %>
<% include BreadCrumbs %>
<% end_if %>
<h1>$Title</h1>
$Content
$Sitemap
$Form
$PageComments
</div>
--- -
Re: Sitemap Tutorial Problems - Blank Site Map

31 July 2008 at 8:24am
Ok well the only PHP error I see is Notice: Undefined variable: rootLevel in /home/nzyg/web/younggreens.org.nz/html/mysite/code/SiteMap.php 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..
-
Re: Sitemap Tutorial Problems - Blank Site Map

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.
-
Re: Sitemap Tutorial Problems - Blank Site Map

2 September 2008 at 12:04pm
I am having exactly the same problem. Any insights to solving the issue would be appreciated.
Thanks
-
Re: Sitemap Tutorial Problems - Blank Site Map

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.
-
Re: Sitemap Tutorial Problems - Blank Site Map

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
| 2635 Views | ||
|
Page:
1
|
Go to Top |



