valdisiljuconoks / optimizely-advanced-contentarea

Optimizely content area renderer on steroids
Apache License 2.0
34 stars 14 forks source link

EditContainerClass does not seem to work with EPiBootstrapArea #23

Closed Codecamv closed 7 years ago

Codecamv commented 7 years ago

We're having problems with specifying a class which should only be displayed on the container if in edit mode.

By default EPiServer offers the property EditContainerClass for this purpose: <div> @Html.PropertyFor(x => x.MainContentArea, new { EditContainerClass ="editor-overflow-hidden" }) </div>

However, it seems to me that this property is swallowed by EPiBootstrapArea. Workaround is to have an if statement in the view which checks if in edit mode, if so use CssClass. CssClass seems to flow through EPiBootstrapArea correctly.

valdisiljuconoks commented 7 years ago

Looks like a bug. Are you on EPi v10?

Codecamv commented 7 years ago

No, we're currently on the last version of the 9 series of EPi. Does EPiBootstapArea support EPi v10 now?

Thanks for your fast reply on this issue.

valdisiljuconoks commented 7 years ago

I'm pretty close to release it. Will take a look altogether.

valdisiljuconoks commented 7 years ago

I'm not quite sure that EPiServer renders things correctly. Here is repro:

  1. Create clean AlloyTech (with no plugin installed). EPiServer version 10.0.1
  2. Modify start page template:
@Html.PropertyFor(x => x.CurrentPage.MainContentArea, new { CssClass = "css-class", EditContainerClass = "edit-container-class" })
  1. inspect result markup for edit mode:
<div class="css-class" data-epi-property-name="MainContentArea" data-epi-use-mvc="True" data-epi-property-rendersettings="{&quot;cssClass&quot;:&quot;css-class&quot;,&quot;editContainerClass&quot;:&quot;edit-container-class&quot;}" style="min-height: 56px;">....

I know that it should be working. What I'm missing? I want to understand where this is working in clean Alloy before jumping to fixing the bug.

valdisiljuconoks commented 7 years ago

The same issue is in 9x versions

Codecamv commented 7 years ago

Maybe I got it wrong and it's an episerver bug. I'll check it out in my project now

Codecamv commented 7 years ago

Seems like an EPi bug, can reproduce bug in CMS 9.12.2 . I'll create an EPi support ticket.

valdisiljuconoks commented 7 years ago

Which version you were using that supported this feature?

Codecamv commented 7 years ago

I haven't used it yet. I found the feature documented in these blog posts:

Related EPi doc: http://world.episerver.com/documentation/Class-library/?documentId=cms/7/a9b90d0a-751c-18ec-d338-d0a5a4c56489

Codecamv commented 7 years ago

From epi support: "I have reported a bug on this issue in our tracking system with id CMS-5125. You should be able to track the status of the bug through our buglist on Episerver world once it goes through triage, accepted as bug and become active."

valdisiljuconoks commented 7 years ago

Ok, let's wait for triage.

valdisiljuconoks commented 7 years ago

Any feedback on this?

Codecamv commented 7 years ago

No, I can't seem to find CMS-5125 in the official buglist. I'll contact support and ask for an update.

I'll give u feedback when I have it.

On Fri, Nov 18, 2016 at 11:03 PM, Wałdis Iljuczonok < notifications@github.com> wrote:

Any feedback on this?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/valdisiljuconoks/EPiBootstrapArea/issues/23#issuecomment-261653907, or mute the thread https://github.com/notifications/unsubscribe-auth/AAyQx2iQcVbLhFZww4zPUp-ObgDFHl22ks5q_iCugaJpZM4KlCbM .

Codecamv commented 7 years ago

I got the following answer from EPi support:

The bug CMS-5125 has been closed as "Not a problem" as EditContainerClass was renamed to CssClass when rendering of content areas was rewritten as part of CMS 7.5.