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.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

class and site map problem?


Reply

2 Posts   1847 Views

Avatar
Ernie

16 December 2011 at 1:17pm Community Member, 3 Posts

Hi, firstly thanks to Devlin and Prawnstar for helping with my "...always defaulting to the error page..." issue.

Now I'm in a mess with he site-map. Having thought I followed the rules for the site map module all that is displayed the browser is:
----------------------------------------
Site-Map
This page displays a sitemap of the pages on the Gryphon Learning site.

Generated with the default ContentController.ss template
---------------------------------------------

With this I created a new page type > templates/sitemap.ss and Layout/sitemap.ss.
In templates/sitemap.ss I reference $SiteMap

Firstly sitemap does not appear as a page type and secondly what displays on the page (as described between the dotted lines) remains the same as if creating a new page type has made no difference???

After flushing I get the following at the top of the page (you see after flushing):

Warning: There are two files both containing the same class: 'C:\xampp\htdocs/mysite/code/Page.php' and 'C:\xampp\htdocs/mysite/code/sitemap.php'. This might mean that the wrong code is being used. in C:\xampp\htdocs\sapphire\core\ManifestBuilder.php on line 487

Any help with the site map would be appreciated.

Thanks Ernie

Avatar
Willr

17 December 2011 at 10:29pm Forum Moderator, 5511 Posts

Make sure your new Page type (SiteMap.php) classes extend both the 'Page' class and the 'Page_Controller' classes for your SiteMap and SiteMap_Controller respectively.