Skip to content

Commit 7586c69

Browse files
committed
DOC Document changes to CMSMain and LeftAndMain
1 parent 0774f54 commit 7586c69

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

en/02_Developer_Guides/15_Customising_the_Admin_Interface/How_Tos/Customise_CMS_Tree.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ by the [jstree](https://jstree.com) library. It is configured through
1313
`client/src/legacy/LeftAndMain.Tree.js` in the `silverstripe/admin` module, as well as some
1414
HTML5 metadata generated on its container (see the `data-hints` attribute).
1515

16-
The tree is rendered through [LeftAndMain::getSiteTreeFor()](api:SilverStripe\Admin\LeftAndMain::getSiteTreeFor()),
16+
The tree is rendered through [LeftAndMain::getTreeFor()](api:SilverStripe\Admin\LeftAndMain::getTreeFor()),
1717
which recursively collects all nodes based on various filtering criteria.
1818
The node strictly just has to implement the [Hierarchy](api:SilverStripe\ORM\Hierarchy\Hierarchy) extension,
1919
but in the CMS usually is a [SiteTree](api:SilverStripe\CMS\Model\SiteTree) object.
@@ -36,7 +36,7 @@ code like this:
3636
<ins class="jstree-checkbox">&nbsp;</ins>
3737
<ins class="jstree-icon">&nbsp;</ins>
3838
<span class="text">
39-
<span class="jstree-pageicon"></span>
39+
<span class="jstree-recordicon"></span>
4040
<span class="item" title="Deleted">New Page</span>
4141
<span class="badge deletedonlive">Deleted</span>
4242
</span>
@@ -57,8 +57,8 @@ Each flag has a unique identifier, which is also used as a CSS class for easier
5757
Developers can easily add a new flag, delete or alter an existing flag on how it is looked
5858
or changing the flag label. The customization of these lozenges could be done either through
5959
inherited subclass or [Extension](api:SilverStripe\Core\Extension). It is just really about how we change the return
60-
value of function `SiteTree->getTreeTitle()` by two easily extendable methods
61-
`SiteTree->getStatusClass()` and `SiteTree->getStatusFlags()`.
60+
value of function `CMSMain::getRecordTreeMarkup()` by two easily extendable methods
61+
`Hierarchy::getTreeTitle()` and `ModelData::getStatusFlags()`.
6262

6363
Note: Though the flag is not necessarily tie to its status of **publication** and it could
6464
be used for flagging anything you like, we should keep this lozenge to show version-related
@@ -109,7 +109,7 @@ use Page;
109109

110110
class HomePage extends Page
111111
{
112-
private static $icon_class = 'font-icon-p-home';
112+
private static $cms_icon_class = 'font-icon-p-home';
113113

114114
// ...
115115
}

0 commit comments

Comments
 (0)