Does anyone know of a DB setting in DotNetNuke, where you can configure ALL modules to disable print or maximize&minimize? Just so I don't have 开发者_运维问答to configure every module individually.
How can I make it a default?
You'll probably want to avoid setting configuration options in the database directly, especially as in this case the configuration options are built into the administrative interfaces in DotNetNuke.
Containers & "Skin Objects"
These two features are elements called Skin Objects that live in a skin or, in this case, a module container. Here they are featured in the core DotNetNuke Minimal Extropy skin (found at /Portals/_default/Containers/Title_Blue.ascx in the website's file system.)
<dnn:ACTIONBUTTON runat="server" id="dnnACTIONBUTTON3" CommandName="PrintModule.Action" DisplayIcon="True" DisplayLink="false" />
<dnn:VISIBILITY runat="server" id="dnnVISIBILITY" minicon="images/DNN-minus.gif" maxicon="images/DNN-plus.gif" />
If the container you wish to use features these elements, you can easily remove them.
Skin & Container Hierarchy
As for setting the default so you don't have to configure each module individually - the way the skin/container system works is as follows:
You can set the skin/container at the following levels:
- Host - default setting for all portals
- Host -> Host Settings -> Appearance -> Host Skin / Host Container
- Portal - default setting for all pages within a portal
- Admin -> Site Settings -> Appearance -> Site Skin / Site Container
- Page - default setting for all modules on a page
- Page -> Settings -> Advanced Settings -> Appearance -> Page Skin / Page Container
- Module - setting specifically for a single module
- Module -> Settings -> Page Settings -> Basic Settings -> Module Container
I'd suggest for your case you find the container that you like and set it at the Portal level so that every module uses that container, and then you can override that container at the module/page level as necessary.
Even easier is you can make it the default
Go to settings for a module
- Mark Collapse/Expand as you would like
- Mark Allow Print as you woud like
- Under advanced settings mark Apply As Default Settings
- Update
Should be golden for any modules added after this -
NOTE: Some versions of DNN in the 4.X range this was a little buggy so had to do it a few times but I have had real good luck with this.
精彩评论