5

Do you know what is the criteria in XPM to paint the lines around a Component in vertical or horizontal mode?

I have the one Component with the Enable Inline Editing for Content TBB enabled involved in other Component which have this TBB enabled too.

<span><!-- Start Component Presentation: {"ComponentID" : "XXXXX", "ComponentModified" : "XXXXX", "ComponentTemplateID" : "XXXXX", "ComponentTemplateModified" : "XXXXX", "IsRepositoryPublished" : false } -->
<div class="class1">
    <div class="class2">                
        <span><!-- Start Component Presentation: {"ComponentID" : "XXXXX", "ComponentModified" : "XXXXX", "ComponentTemplateID" : "XXXXX", "ComponentTemplateModified" : "XXXXX", "IsRepositoryPublished" : false } -->
            <div class="class3">|</div>
        </span>             
    </div>
</div>

When I try to put a Component before or after the element with class class3, XPM show lines at the left and at the right of this Component, so it works well for me.

Then, I generate a similar HTML like above and XPM shows the lines around the element with class class6 at the top and at the bottom of it, and I want to put it like the first example (left and right).

<span><!-- Start Component Presentation: {"ComponentID" : "YYYY", "ComponentModified" : "YYYY", "ComponentTemplateID" : "YYYY", "ComponentTemplateModified" : "YYYY", "IsRepositoryPublished" : false } -->
<div class="class4">
    <div class="class5">                
        <span><!-- Start Component Presentation: {"ComponentID" : "YYYY", "ComponentModified" : "YYYY", "ComponentTemplateID" : "YYYY", "ComponentTemplateModified" : "YYYY", "IsRepositoryPublished" : false } -->
            <div class="class6">|</div>
        </span>             
    </div>
</div>

If I remove the TBB for the Components which involves the other ones (class1 and class4) XPM puts me the lines around the Components class3 and class6 at the left and at the right...

I add a screenshot to specify what I mean:

enter image description here

Could I do something to put the second example like the first one? What is the criteria in XPM to put the lines in vertical mode or horizontal mode?

I add some curious information that probably gives more information to try to solve the problem: when I remove the first container element ("class1"), the second Component ("class6") paints the lines at the left and at the right of itself.

3

XPM borders are drawn around Component Presentations based on the HTML element in which the Start Component Presentation markup is specified. Take for example the following HTML:

<div>
   <article>
       <!-- Start Component Presentation: {...} -->
       <span>...</span>
   </article>
<div>

The border around the Component Presentation is drawn using the size of the article element.

For XPM Dropzones this is quite similar, but following the Start Region markup. Take for example the following HTML:

<header>
    <!-- Start Region: {...} -->
    <div>
       <!-- Start Component Presentation: {...} -->
       <span>...</span>
    </div>
</header>

The border for the XPM Dropzone is drawn using the size of the header element, in combination with the size of the div (since it will be drawn on top or at the bottom of that).

Now in general the Dropzones are always displayed above and below a Component Presentation, since you are technically inserting a Component Presentation into a Page, and that can only be done either before or after another Component Presentation.

As far as I know there is no way to control the behavior of where the Dropzone areas are drawn, but indeed they are not always drawn above or below the Component Presentation (what you would call horizontal I guess). It seems that depending on the amount of Component Presentations inside a Region and their display, the Dropzone areas can also be drawn left and right of the Component Presentation. See attached screenshot which I pasted together showing three different Dropzones being drawn inside the same Region, with Component Presentations using similar HTML markup (but of different sizes).

enter image description here

The only thing I can identify in this case is that if the Component Presentation border is smaller than the Region border and not touching the left side of the Region border (which is the case for the second and third Component Presentation in this example), the XPM Dropzone area will be drawn left and right of the Component Presesentation.

  • I add more curious information Bart. – Sergio Alonso Aug 24 '17 at 9:04

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.