Jump to:

5554 Posts in 1742 Topics by 1227 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Show ID in Files&Images

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

Page: 1
Go to End
Author Topic: 611 Views
  • lx
    Community Member
    83 Posts

    Show ID in Files&Images Link to this post


    I wanted to show the ID of each File under the files&images tab.
    A single line in cms/code/AssetTableField.php helped:

    function __construct($controller, $name, $sourceClass, $fieldList, $detailFormFields, $sourceFilter = "", $sourceSort = "", $sourceJoin = "") {
    // adds an ID column
    $fieldList = array_merge(array("ID" => "ID"), $fieldList);

    parent::__construct($controller, $name, $sourceClass, $fieldList, $detailFormFields, $sourceFilter, $sourceSort, $sourceJoin);

    But this isnt a very good solution because it makes changes within the cms/ -folder.
    Does anyone know a way, without changing systemcode?


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.