Take the 2-minute tour ×
Tridion Stack Exchange is a question and answer site for Tridion developers and administrators. It's 100% free, no registration required.

I have a 'Edit' button in RTF popup to edit the selected component. I have the selected component's context url in text box within popup. I need to open the parent component in a new window. Please help to get the parent publication of this component.

Thanks nuno, that worked. Is there a way to open the OOB editable popup(SS attached) from the anguilla framework to let the authors to select the option enter image description hereto open the component.

share|improve this question
1  
Your follow-up question is actually quite different than your original. The answer to that is calling the Open command with a selection of that item URI. Perhaps you should ask it as a separate question (so someone else who wonders the same thing can find it easily)? –  Peter Kjaer May 12 at 9:25
    
+1 - Do ask as a separate question given this one already has an accepted answer and it will be confusing to others. –  Nuno Linhares May 12 at 9:49

1 Answer 1

up vote 4 down vote accepted

You can get an item's owning publication by asking for it...

If I type the following in the Chrome Console I get the correct publication ID for the item.

var x = $models.getItem("tcm:1-23");
x.load(); // Insert smart async stuff here
x.getOwningPublication().getId();
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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