As workarount I solve this that way:
1.
create App.Setting bool value (HideInnerContentAdd)
2.
create web api for toggle this value
using DotNetNuke.Security;
using DotNetNuke.Web.Api;
using System.Web.Http;
using ToSic.SexyContent.WebApi;
using System;
using System.Linq;
using System.Collections.Generic;
using ToSic.SexyContent;
using System.Dynamic;
public class nnFootBoxController : SxcApiController
{
// ########################################################################################
[HttpGet]
[DnnModuleAuthorize(AccessLevel = SecurityAccessLevel.Edit)]
[ValidateAntiForgeryToken]
public dynamic ToogleInnerContentMenu()
{
var tObj = AsDynamic(App.Settings);
if (tObj==null) return false;
var state = false;
if (tObj.HideInnerContentAdd!=null) state = (bool)(tObj.HideInnerContentAdd);
state = !state;
var newValues = new Dictionary<string, object>();
newValues.Add("HideInnerContentAdd", state);
App.Data.Update(tObj.EntityId, newValues);
return state;
}
// ########################################################################################
}
3.
add code to footer of module you want to be shown on all pages for changing state.
@if(Permissions.UserMayEditContent){
<link rel="stylesheet" type="text/css" href="https://gitcdn.github.io/bootstrap-toggle/2.2.2/css/bootstrap-toggle.min.css" data-enableoptimizations="true" />
<script type="text/javascript" src="https://gitcdn.github.io/bootstrap-toggle/2.2.2/js/bootstrap-toggle.min.js" data-enableoptimizations="true"></script>
<script type="text/javascript" src="/DesktopModules/ToSIC_SexyContent/Js/2sxc.api.min.js" data-enableoptimizations="true"></script>
<script type="text/javascript" src="@App.Path/js/toggle-innercontentshow.js" data-enableoptimizations="true"></script>
<div>
<input class="nn-toggle-innercontentshow" type="checkbox" @innerContentMenuChecked() data-toggle="toggle" data-on="On" data-off="Off" onchange="nnFooterBox_cbToggle(this,@Dnn.Module.ModuleID)">
</div>
}
@functions{
public dynamic lib { get { return CreateInstance("../_Shared.cshtml"); } }
public string innerContentMenuChecked(){
return isInnerContentMenuVisible() ? "checked" : "";
}
public string innerContentMenuClass(){
return isInnerContentMenuVisible() ? "sc-content-block-list" : "";
}
public bool isInnerContentMenuVisible(){
var tState = ((DynamicEntity)(App.Settings)).HideInnerContentAdd;
if (tState=="True") return false;
return true;
}
}
4.
Change code for render inner content...
<!-- start modules -->
<div class="@innerContentMenuClass()" @Edit.ContextAttributes(Content, field: "Modules")>
@foreach(var cb in Content.Modules) {
@cb.Render();
}
</div>
<!-- end modules -->
With @innerContentMenuClass() enable or disable Quick Add For Inner Content Blocks...
5.
I know that this Is not nice code but work for me...
If somebody have nicer code please help me back...