Admin items table: custom columns

Hey,

Where is “user-configured columns data” settings ?

I want to display a custom column (identifier) in my items admin page

I found this in omeka-s repository (here)

   /**
     * Get data for all columns.
     *
     * Note that context determines the origin of user-configured data: "public"
     * context derives from site settings; "admin" context derives from user
     * settings.
     */
    public function getColumnsData(string $context, string $resourceType, $userId = null) : array
    {
        // First, get the user-configured columns data, if any. Set the default
        // if data is not configured or malformed.
        $userColumnsSetting = sprintf('columns_%s_%s', $context, $resourceType);
        $userColumnsData = ('public' === $context)
            ? $this->getSiteSettings()->get($userColumnsSetting, null)
            : $this->getUserSettings()->get($userColumnsSetting, null, $userId);

        if (!is_array($userColumnsData) || !$userColumnsData) {
            $userColumnsData = $this->columnDefaults[$context][$resourceType] ?? [];
        }

How to access this “user-configured columns data” settings ?
Thank you for you help.

What version are you running?

The “user configured columns” stuff being referred to here is a new system for the upcoming Omeka S version: it will let users configure which columns are visible on the admin browse tables.

If you’re on 3.2.3 or an older version, you don’t have that feature (yet). You’d only be able to use it if you were running the in-development code from Github. We’re planning to have the release out that will contain this (and many other features) soon, and a preview release candidate available beforehand.

OK great news for that new release!
Thanks for that answer.

I’m running 3.2.3.
So there is no "user-configured columns data” settings :frowning:
The php function is already implemented (at least declared in the 3.2.3 release code!) but it doesn’t act as there is no data to read. For other similar cases: just a little additional line of comment in the code?

loooking forward to test that new version :slight_smile: