3

I am trying to move component presentations across a page using XPM, but I don’t completely understand the rules followed by XPM to move component presentations. Does it calculate the new place using the other Component Presentation marks in the page? Our problem here is that we use nested component presentations to render component links, we have obtained weird results when moving component presentations (not nested but the outer component presentation). For example, we have three component presentations in our page, but one of them is a component that has three linked components. We render each linked component using RenderComponentPresentation function, and the inner component template does the marking work for each nested component presentation. So we have:

<span>
 <!-- Start Component Presentation …… (First component) -->
</span>
<span>
  <!-- Start Component Presentation …… (Collection type component) -->
    <span>
     <!-- Start Component Presentation …… (Linked component)-->
    </span>
    <span>
     <!-- Start Component Presentation …… (Linked component)-->
    </span>
</span>
<span>
 <!-- Start Component Presentation …… (Other component) -->
</span>

When I try to move the last component presentation using the arrows in the ribbon, it doesn’t move. I think it has something to do with the nested component presentation but as I don’t understand the rules XPM follows, I am not sure how to solve the issue.

  • With the move option selected, can you drag the "Other" component on the page and see locations where it's allowed? The cursor should show as an arrow and "drop locations" should show as colored bars. XPM will also enforce things like page permissions, check-out status, and regions so a move might not be possible because of other reasons. In terms of embedded Component Presentations like yours, I've been able to create invalid pages where XPM detects the wrong schema + template that don't match the regions. So XPM does read the CP marks to an extent, though I'm not sure on ordering yet. – Alvin Reyes Jul 3 '14 at 19:34
  • This is weird. I can move "Other" using the move icon and dragging component, and it does move ok one position up. But when I use the "move up" arrow, update preview is triggered but component stays in the same place. And it only happens to the last component in the page. – Inmaculada Palacios Jul 4 '14 at 7:10
  • I'm not sure why Preview is missing the change, but publishing (manually or through Finish Editing) should probably re-order the items correctly though. – Alvin Reyes Aug 21 '14 at 18:36
4

I think you first should click on the icon in ribbon toolbar for Content Border to reflect borders of all your component presentation. Ensure that you have border of your content getting created in webpage as per the expectation and your first component presentation area is not getting partially overlapped with the component presentation of second component (which you are trying to move).

  • Thanks for your answer; borders are a bit overlapped but when I look at html code, I can see the container div and inside it, a <span> tag for each component presentation in my page. – Inmaculada Palacios Jul 3 '14 at 8:01
4

You should keep in mind what Tridion is trying to do when you move Component Presentations. Experience manager will change the order of the Component Presentations in the page when you move them. So, embedded CPs will definitely not work.

You should still be able to move the CPs (first, list, other), but not the ones within the list, since those are not in the page.

This also means that your Page Template, when publishing the page, should respect the order of the CPs in it, or the editor won't see any changes after publishing.

  • Thanks for your answer. That's what I am trying to do, moving "other" one position up in the page, that is, between "first" and "list". But it doesn't work. That's why I thought XPM is kind of confused because of the nested component presentation, and I'd like to know how it calculates where to move components. – Inmaculada Palacios Jul 3 '14 at 7:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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