5

Is it possible to add thumbnails in CME in SDL Tridion so that the user gets an idea about the layout of the CT for the component he/she is going to add on the page? If it is,how to add them? Any help would be appreciated Thanks in advance!

  • 1
    Why do you want a thumbnail for layout as there is already a "Preview" button out of the box on "Insert Component Presentation" popup? By clicking on the button editor can view the layout. – Saurabh Gangwar Jan 6 '15 at 9:02
  • Where should that thumbnail be shown, you want to update the little icon in the CT dropdown? – Bart Koopman Jan 6 '15 at 9:08
10

If you mean to add a thumbnail instead of the little icon which is displayed in the Component Template dropdown on the Insert Component Presentation dialog in a Page (see image below), then technically that is possible, but there are a few things I should mention.

CT dropdown

It is possible to change icons in a list using a UI extension/data extender, see Listdefinition & DataExtender: Custom Icons for a hint (or search for similair questions/answers). But it is probabaly going to be a lot of work to get a different icon showing for every single CT displayed in that list. And then you still only have a very small icon there, I would not really call that a thumbnail anymore.

My suggestion would be to use something a lot simple, requiring a lot less effort. Typically we use naming conventions to give an idea of what the layout is going to be, see again my image above. the layout is displayed between the square brackets in the title.

Another option would be to upgrade to SDL Tridion 2013, there you have the option to change the icons which are used in Experience Manager (XPM), see the image below for an example of the icon used on a Component Template:

XPM Layout ribbon

Now currently this is still showing the same icon, but in 2013, you can actually change that icon in the Component Template. See the screenshot below of the CT:

Component Template

Please note, these icons are only used in the XPM ribbon toolbar.

3

While browsing through SDL Live documentation, just came across an article(login required) where the step by step solution given to change the icons of CTs & PTs in Experience Manager(XPM). Please check if it is useful!

1

If you surly want to do it and without upgrading to 2013 as suggested by @Bart, you can achieve it by custom extensions.

In your extension, you can use Application Data which is a very useful feature introduced in 2011. Basically you can save application data against a tridion item in the form of byte array. so in your case you can save a image against a CT.

Of course you wil have to extend the GUI according to your need.

I am sharing a code sample here to save application data using coreservice.

Hope, it helps.

private void SetAppData(SessionAwareCoreServiceClient client, string itemUri, Dictionary<string, Byte[]> keyValues)
        {
            var appDataArray = new List<ApplicationData>();
            foreach (KeyValuePair<string, Byte[]> keyValue in keyValues)
            {
                var appData = new ApplicationData();
                appData.ApplicationId = keyValue.Key;
                appData.Data =  keyValue.Value;
                appDataArray.Add(appData);
            }
            client.SaveApplicationData(itemUri, appDataArray.ToArray());
        }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.