Jump to:

23015 Posts in 11874 Topics by 2830 members

General Questions

SilverStripe Forums » General Questions » class and site map problem?

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

Page: 1
Go to End
Author Topic: 1795 Views
  • Ernie
    Avatar
    Community Member
    3 Posts

    class and site map problem? Link to this post

    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

  • Willr
    Avatar
    Forum Moderator
    5464 Posts

    Re: class and site map problem? Link to this post

    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.

    1795 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.