1 | <?php |
||
3 | class SitemapPageDecorator extends SiteTreeExtension |
||
|
|||
4 | { |
||
5 | |||
6 | /** |
||
7 | * Note, you have to list each class explicitely |
||
8 | * That is, descendants need to be listed as well |
||
9 | * as their parents, to exclude them both. |
||
10 | * |
||
11 | * Includes override excludes. If you list includes, |
||
12 | * then only those pages will be shown. |
||
13 | * If you dont list includes, then the exclude list will be |
||
14 | * used and if this is empty all page types will be included. |
||
15 | * |
||
16 | * @var Array |
||
17 | */ |
||
18 | private static $sitemap_classes_to_exclude = array("ErrorPage"); |
||
19 | |||
20 | /** |
||
21 | * Note, you have to list each class explicitely |
||
22 | * That is, descendants need to be listed as well |
||
23 | * as their parents, to exclude them both. |
||
24 | * |
||
25 | * Includes override excludes. If you list includes, |
||
26 | * then only those pages will be shown. |
||
27 | * If you dont list includes, then the exclude list will be |
||
28 | * used and if this is empty all page types will be included. |
||
29 | * |
||
30 | * @var Array |
||
31 | */ |
||
32 | private static $sitemap_classes_to_include = array(); |
||
33 | |||
34 | /** |
||
35 | * @return DataList |
||
36 | */ |
||
37 | public function SiteMapPages($noParent = false) |
||
61 | } |
||
62 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.