1

Could any one help me out.

  1. I have a created a custom button in the tridion ribbon.(Item View)

  2. In a given page we will be having the 'Component Presentation' and 'Target Group'

Now I need to get the tcm-id of the Component Presentation and the selected Target Group on click of the Button(created in step1).

Bart Koopman
  • 4,835
  • 17
  • 30
  • If you selected the component presentation before clicking the button, you _may_ have it in the selection parameter. Have you tried that? – Nuno Linhares Jul 11 '12 at 15:42
  • 10
    And if it's urgent, you may consider _hiring_ someone that knows how to do it. – Nuno Linhares Jul 11 '12 at 15:42
  • Thanks for your reply Nuno. I got what you mean. Actually i am new to tridion. Could you please tell me the way how to retrieve tcmid using selection parameter ? – user1518281 Jul 11 '12 at 15:47
  • selection is an array[] of whatever the user has currently selected. Check what's inside of it, and you'll figure out how to get it. – Nuno Linhares Jul 11 '12 at 15:53
  • 1
    removed the SDL tag, it is not pointing to SDL the company which delivers SDL Tridion – Bart Koopman Jul 11 '12 at 15:54
  • Given the vague information there are probably many ways in which this could be addressed. Perhaps you could expand your question to provide more background on what you're trying to achieve, and why. – Jeremy Grand-Scrutton Jul 11 '12 at 16:10
  • @Bart: the SDL tag here at Stack Overflow points to a sound library, not to the company. ;-) – Frank van Puffelen Jul 11 '12 at 17:56
  • 1.I have a created a custom button in the tridion ribbon.(Item View) 2.In a given page we will be having the 'Component Presentation' and 'Target Group' If I select a component in from the component presentation, i need to get the tcm-id of the selected Component Presentation and the Target Group mapped with the same. I need to achieve this through a javascript. – user1518281 Jul 12 '12 at 04:35
  • All you've done there is repeat what was in your original question. It's still no clearer what you're trying to achieve, or why. What are you going to do with this information when you get it? What is the requirement that you're building this to meet? – Jeremy Grand-Scrutton Jul 12 '12 at 05:11
  • possible duplicate of [How to get current Page TCMid, selected component Presentation TCMID for a Tridion page through javascript?](http://stackoverflow.com/questions/11446313/how-to-get-current-page-tcmid-selected-component-presentation-tcmid-for-a-tridi) – Frank van Puffelen Jul 12 '12 at 15:26
  • yes both questions are same.. i got my solution .. Thanks to all of you :) – user1518281 Jul 12 '12 at 15:45

1 Answers1

1

I think I've answered this question here: restrict user to insert same component and template

Thanks

John

Community
  • 1
  • 1
johnwinter
  • 3,624
  • 15
  • 24