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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

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

Show ID in Files&Images


Go to End


976 Views

Avatar
lx

Community Member, 83 Posts

9 October 2010 at 11:45pm

Hi,

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?

thanks