November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Take a look at this blog post: custom rendering of content areas.
Frederik
This way do not break the content area, it merely hide the "actionContainer" through css, so it should *cough* never break any funtionality:
Create a custom editor descriptor, like so:
///
/// Hides the "you can drop content here..." part of a content area when rendered in edit mode
///
[EditorDescriptorRegistration(TargetType = typeof(ContentArea), UIHint = "HideContentAreaActionContainer")]
public class HideActionContainerContentAreaEditing : ContentAreaEditorDescriptor
{
public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable attributes)
{
base.ModifyMetadata(metadata, attributes);
metadata.OverlayConfiguration["className"] = "hideActionContainer";
}
}
Apply it to a property:
[UIHint("HideContentAreaActionContainer", PresentationLayer.Edit)]
public virtual ContentArea MyContentArea { get; set; }
Add a edit mode css file in module.config:
Add the styling to hide the area in /clientresources/styles/styles.css:
.hideActionContainer .epi-overlay-blockarea-actionscontainer {
display: none!important;
}
Cannot get this to work.
The metadata.OverlayConfiguration[
"className"
] =
"hideActionContainer"
does not seem to write the class on the dom element.
EDIT
Currently on episerver version 7.18 (dll)
What we did in one project is we just overwrote the UI text "you can drop..." With our own version as the link to create new block was embedded to that UI text that can be found from recourse xml files embedded to episerver dll.
Not elegant sure but worked :)
Hi Janne:
I cannot owerrite the lang file since this is to occur only on one block.
Not system wide
Hi,
Is it possible to customize the rendering of the contentarea in editmode? i need to remove the "You can drop content here, or create a new block" section and stil keep the drag and drop functionality.
Any ideas?
Thanks
Jesper