Tridion GUI Extensions : How to load a JavaScript without showing a GUI element

A while ago I was struggling with the above mentioned challenge: I wanted to load some JavaScript into the Tridion Content Manager GUI, but without showing a corresponding GUI element (Button, list, etc).
I searched the online documentation portal, the good old forum, searched all the Tridion blogs, but could not find it.
With no other option left, I turned to the experts. Since not too long, they can also be found here.
(And while you’re there, why not join us?)

It took precisely 3 minutes and I had my answer. Since I could not find it, I assume you also cannot find it. That’s why I share it here.
But not without mentioning the one who gave me the answer: Frank. Thanks.

For adding a JavaScript to extend the Tridion Content Manager GUI, but without showing a button or list or whatever, the following configuration is needed:

This piece of configuration makes sure that your javascript file is loaded for the complete GUI. This might not be what you want.
Let’s say you only want to load your methods/classes for a certain view, let say the Component-edit screen. You can achieve this by adding the following code to your
JavaScript file:

Share this:

Like this:

LikeLoading...

Related

This entry was posted on Monday, January 30th, 2012 at 9:10 pm and is filed under Tridion. You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.

Post navigation

5 Responses to Tridion GUI Extensions : How to load a JavaScript without showing a GUI element

Indeed, the mentioned configuration part defines the Domain Model group and system will make sure that all Domain Model groups are added to any view with Tridion Manager on it. Except for the pages, where Tridion Manager node contains "ExcludeModels" attribute set to true. In this situation Domain Model groups will not be added at all.

In any case, adding group to all views when you want it only on the one of them – is not optimal. If you want your group to be added on certain view – you can always extend the group for that specific view.
For example, if you want your files only on Component-edit screen, you can extend "Tridion.Web.UI.Editors.CME.Views.Component" group.

Here is the definition for extension group and for the files group itself (in 'Editor.config'):