In Tridion UI-2012, we have a Component with a list of Component links.

Each Component link is behaving like a link in the Staging site (its on click event is being set). Now we are trying to edit these links using Tridion UI-2012 in the Staging site, but as we select the Component link to make it editable, it redirects us to the respective page it links to.

In short we are not able to edit any of our links in the staging site. Is there any way to do this?

  • 2
    Are you really setting onclick events on the links, and why is that needed exactly? Perhaps you can edit your question and add a bit of the HTML of the Page from the Staging site to your question, showing the SiteEdit markup and the actual links, that would help us in understanding your issue and guiding you towards a solution. Aug 27, 2013 at 6:54
  • Thanks Bart. Actually we have added on click event through jquery for component link that redirects us to the respective page it links to.Each component link itself has a HTML div container with set of text content.
    – Rita
    Aug 27, 2013 at 10:03

1 Answer 1


Since you are adding the onclick through jQuery, UI-2012 doesn't know it is there. So it cannot even try and disable it for you as it does on normal links.

With the onclick event on the div, it will be impossible to select the item indeed (as the border of the field will be the same size as the div you have an onclick event on).

You should probably look at disabling the onclick when UI-2012 is enabled. This would allow you to edit the text on the Staging site when UI-2012 is enabled, and in any other case the links would work as expected. I've described something similar in my blog post about Experience Manager (Experience Manager is the name of UI-2012 for 2013).

I only needed to show additional elements when UI-2012 was enabled, so I marked those with the class xpm-only and used the following jQuery to hide or show them accordingly:

 * Experience Manager show/hide
(function ($, window, i) {
  $.fn.xpmShowHide = function (options) {
    return this.each(function () {
      var $this = $(this);

      if (window.self === window.top) {
        // not in a frame
      } else {
        // in a frame (probably experience manager)
})(jQuery, this, 0);

$(document).ready(function() {
  // show or hide elements specifically for experience manager

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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