6

Here is the snippet of code..

<a class="link-display"  target="_self"  onclick="doLink('TaggingMetaData:banner;bannerTitle:PRO_Simple Promo;bannerId:64-90667;;url:/newSiteEditSP1/newpagetest.html;urlTarget:_self;urlType:internal;linkTitle:Simple Promo with component link;popupparams:;siteEdit:2;Segments1:;Segments2:;Segments3:;Segments4:');return(false);" onkeypress="doLink('TaggingMetaData:banner;bannerTitle:PRO_Simple Promo;bannerId:64-90667;;url:/newSiteEditSP1/newpagetest.html;urlTarget:_self;urlType:internal;linkTitle:Simple Promo with component link;popupparams:;siteEdit:2;Segments1:;Segments2:;Segments3:;Segments4:');return(false);" href="/newSiteEditSP1/newpagetest.html?WT.ac=PRO_Simple+Promo_64-90667_T90672-NE-newsiteeditsp1&oc_id=PRO_Simple+Promo_64-90667_T90672-NE-newsiteeditsp1" >
  <span>
    <!-- Start SiteEdit Component Field: {"XPath" : "tcm:Content/custom:Content/custom:Links[2]/custom:Title"} -->
    Simple Promo with component link
  </span>
</a>
Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
user1808474
  • 161
  • 2
  • It would help if you could explain what happens and how that differs from what you expect. With the limited information available, I'm guessing that your custom JavaScript (@onclick) is interfering with the editing. – Peter Kjaer Jan 03 '13 at 12:13

1 Answers1

6

This will not work like

<!-- Start SiteEdit Component Field: {"XPath" : "tcm:Content/custom:Content/custom:Links[2]/custom:Title"} -->

You have to create the siteedit component presentation tag for component link component and then use like

  <span>
     <!-- Start SiteEdit Component Presentation: {"ID" : "cp_uniqueid", "ComponentID" : "component link component id", "ComponentTemplateID" : "templateid", "Version" : 3, "IsQueryBased" : true  } -->
      <span>
   <!-- Start SiteEdit Component Field: {"XPath" : "tcm:Content/custom:Content/custom:Title[1]"} -->
        Simple Promo with component link
      </span>
     </span>

Hope it helps..

Thanks

vikas kumar
  • 2,444
  • 15
  • 25
  • yes i have formed the component presentation tag before component field – user1808474 Dec 27 '12 at 10:04
  • what's the issue then? remember you have to use the component link component id in the component presentation tag around this and use the proper xpath without link field.. – vikas kumar Dec 27 '12 at 10:38