11

I am attempting to implement regions on my page templates for XPM and running into some problems. I have read Alvin's page on XPM regions (insert vs create), Bart's "Having Fun with XPM" (oh the irony right now), and the SDL docs page on regions. I am simply doing:

<!-- Start Region: {
    title: "MainContent",
    allowedComponentTypes: [
        {
            schema: "tcm:6-195-8"
            template: "tcm:8-288-32"
        }
    ],

    maxOccurs: 10
} -->

where schema is an article schema and template is a basic article template.

The behavior I am getting when I insert this onto my page causes everything in SiteEdit mode to become 'grayed' out and no experience manager functionality. Note: I am still able to enter the UI with the "SDL Tridion" icon.

Without the regions markup, all of my site edit markup for component presentations and fields provide the editing functionality as expected. It only breaks when I insert the regions markup. Is there specific configuration for regions to work correctly?

I am running Tridion 2013 SP1. Thanks in advance.

2
  • At a guess, the fact that your schema URI and the template URI are from different publications is causing this. Can you try having those URIs match the website publication?
    – Nuno Linhares
    Commented Apr 9, 2015 at 16:55
  • Good point, and something I should have undoubtedly tested first. This doesn't seem to resolve my problem however. I tested further in different browsers with both matching URI pairs and the sample I provided. I.E. is the only browser to display my site edit zones with borders, but only on zones outside of my region. chrome and firefox exhibit the same behavior of giving me no functionality for either URI pair.
    – Loya1ty
    Commented Apr 9, 2015 at 18:21

2 Answers 2

8

So to me this looks like it's supposed to be a JSON object:

Start Region: {
title: "MainContent",
allowedComponentTypes: [
    {
        schema: "tcm:6-195-8"
        template: "tcm:8-288-32"
    }
],

maxOccurs: 10
}

Except for one thing -- you missed a comma between the schema and template. Will fixing that make it work? Really just pulling this out of thin air.

6
  • Good eyes. I could have looked at it forever
    – Nuno Linhares
    Commented Apr 9, 2015 at 21:52
  • 1
    That was it... slightly embarrassing for my first SE question. Good news is that they can only get better from here.
    – Loya1ty
    Commented Apr 9, 2015 at 22:03
  • Haha thanks Nuno, I slightly cheated though by putting just the JSON looking part into the Chrome console and messed around with it until it worked :-) Commented Apr 9, 2015 at 22:13
  • 2
    Welcome to StackExchange. It was a good question, now I know there's at least one person trying to use regions :)
    – Nuno Linhares
    Commented Apr 9, 2015 at 23:32
  • @NunoLinhares make that two persons please :p Commented Apr 10, 2015 at 19:06
1

This is from the Digital Experience Accelerator (aka SDL Tridion Reference Implementation) and it is working on all browsers (2013 SP1)

<!-- Start Region: {title: "Info", allowedComponentTypes: [{schema: "tcm:3-119-8", template: "tcm:3-165-32"}, {schema: "tcm:3-119-8", template: "tcm:3-191-32"}], minOccurs: 0} -->

I don't see any glaring difference, other than the fact that it is in one line (which I know for a fact is not a problem because I used it differently on a different implementation).

The only other thing I can think of is that somehow your HTML DOM gets messed up in some browsers (seen that before with Chrome & Firefox "fixing" the DOM for you when some invalid stuff is used, like <span><div></div></span> (div is not allowed inside a span) or you may have some tag that is not closed correctly, making the browser go bonkers when Tridion tries to define where the region starts and ends. In other words, you may have to go beyond the region definition itself to look for the culprit.

There is definitely no configuration specific to enabling Regions.

1
  • Thanks for taking a deeper look, Nuno. I was suspecting something of this nature, due to some html tags used for jump link ids and other XPM zones in addition to the browser diff I was seeing. Much simpler error caused by me, however. Thanks again.
    – Loya1ty
    Commented Apr 9, 2015 at 22:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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