• Basics
  • Abyss
  • Web APIs
  • C# & Razor
  • .net API
  • JS & TS API

    Show / Hide Table of Contents

    Class Factory

    This is a factory to create CmsBlocks, Apps etc. and related objects from DNN.

    Warning

    This API is obsolete and will be removed in a future release. You should migrate your code to use real services instead, like:

    • IRenderService
    • IDynamicCodeService
    Inheritance
    System.Object
    Factory
    Namespace: ToSic.Sxc.Dnn
    Assembly: ToSic.Sxc.Dnn.Core.dll
    Syntax
    [PublicApi]
    [Obsolete("This is obsolete in V13 but will continue to work for now, we plan to remove in v15 or 16. Use the IDynamicCodeService or the IRenderService instead.")]
    public static class Factory

    Methods

    | Improve this Doc View Source

    App(Int32, PortalSettings, Boolean, Boolean, ILog)

    Get a full app-object for accessing data of the app from outside

    Declaration
    [Obsolete("This is obsolete in V13 but will continue to work for now, we plan to remove in v15 or 16. Use the IDynamicCodeService or the IRenderService instead.")]
    public static IApp App(int appId, PortalSettings ownerPortalSettings, bool unusedButKeepForApiStability = false, bool showDrafts = false, ILog parentLog = null)
    Parameters
    Type Name Description
    System.Int32 appId

    The AppID of the app you need

    DotNetNuke.Entities.Portals.PortalSettings ownerPortalSettings

    The owner portal - this is important when retrieving Apps from another portal.

    System.Boolean unusedButKeepForApiStability

    Tells the App that you'll be using page-publishing. So changes will me auto-drafted for a future release as the whole page together.

    System.Boolean showDrafts

    Show draft items - usually false for visitors, true for editors/admins.

    ILog parentLog

    optional logger to attach to

    Returns
    Type Description
    IApp

    An initialized App object which you can use to access App.Data

    | Improve this Doc View Source

    App(Int32, Boolean, Boolean, ILog)

    Get a full app-object for accessing data of the app from outside

    Declaration
    [Obsolete("This is obsolete in V13 but will continue to work for now, we plan to remove in v15 or 16. Use the IDynamicCodeService or the IRenderService instead.")]
    public static IApp App(int appId, bool unusedButKeepForApiStability = false, bool showDrafts = false, ILog parentLog = null)
    Parameters
    Type Name Description
    System.Int32 appId

    The AppID of the app you need

    System.Boolean unusedButKeepForApiStability

    Tells the App that you'll be using page-publishing. So changes will me auto-drafted for a future release as the whole page together.

    System.Boolean showDrafts

    Show draft items - usually false for visitors, true for editors/admins.

    ILog parentLog

    optional logger to attach to

    Returns
    Type Description
    IApp

    An initialized App object which you can use to access App.Data

    | Improve this Doc View Source

    App(Int32, Int32, Boolean, Boolean, ILog)

    Get a full app-object for accessing data of the app from outside

    Declaration
    [Obsolete("This is obsolete in V13 but will continue to work for now, we plan to remove in v15 or 16. Use the IDynamicCodeService or the IRenderService instead.")]
    public static IApp App(int zoneId, int appId, bool unusedButKeepForApiStability = false, bool showDrafts = false, ILog parentLog = null)
    Parameters
    Type Name Description
    System.Int32 zoneId

    The zone the app is in.

    System.Int32 appId

    The AppID of the app you need

    System.Boolean unusedButKeepForApiStability

    Tells the App that you'll be using page-publishing. So changes will me auto-drafted for a future release as the whole page together.

    System.Boolean showDrafts

    Show draft items - usually false for visitors, true for editors/admins.

    ILog parentLog

    optional logger to attach to

    Returns
    Type Description
    IApp

    An initialized App object which you can use to access App.Data

    | Improve this Doc View Source

    CmsBlock(ModuleInfo)

    Get a Root CMS Block if you have the ModuleInfo object

    Declaration
    [Obsolete("This is obsolete in V13 but will continue to work for now, we plan to remove in v15 or 16. Use the IDynamicCodeService or the IRenderService instead.")]
    public static IBlockBuilder CmsBlock(ModuleInfo moduleInfo)
    Parameters
    Type Name Description
    DotNetNuke.Entities.Modules.ModuleInfo moduleInfo

    A DNN ModuleInfo object

    Returns
    Type Description
    ToSic.Sxc.Blocks.IBlockBuilder

    An initialized CMS Block, ready to use/render

    | Improve this Doc View Source

    CmsBlock(Int32, Int32)

    Get a Root CMS Block if you know the TabId and the ModId

    Declaration
    [Obsolete("This is obsolete in V13 but will continue to work for now, we plan to remove in v15 or 16. Use the IDynamicCodeService or the IRenderService instead.")]
    public static IBlockBuilder CmsBlock(int pageId, int modId)
    Parameters
    Type Name Description
    System.Int32 pageId

    The DNN tab id (page id)

    System.Int32 modId

    The DNN Module id

    Returns
    Type Description
    ToSic.Sxc.Blocks.IBlockBuilder

    An initialized CMS Block, ready to use/render

    | Improve this Doc View Source

    CmsBlock(Int32, Int32, ILog)

    Get a Root CMS Block if you know the TabId and the ModId

    Declaration
    [Obsolete("This is obsolete in V13 but will continue to work for now, we plan to remove in v15 or 16. Use the IDynamicCodeService or the IRenderService instead.")]
    public static IBlockBuilder CmsBlock(int pageId, int modId, ILog parentLog)
    Parameters
    Type Name Description
    System.Int32 pageId

    The DNN tab id (page id)

    System.Int32 modId

    The DNN Module id

    ILog parentLog

    The parent log, optional

    Returns
    Type Description
    ToSic.Sxc.Blocks.IBlockBuilder

    An initialized CMS Block, ready to use/render

    | Improve this Doc View Source

    CmsBlock(IModule, ILog)

    Get a Root CMS Block if you have the ModuleInfo object.

    Declaration
    [Obsolete("This is obsolete in V13 but will continue to work for now, we plan to remove in v15 or 16. Use the IDynamicCodeService or the IRenderService instead.")]
    public static IBlockBuilder CmsBlock(IModule module, ILog parentLog = null)
    Parameters
    Type Name Description
    ToSic.Sxc.Context.IModule module
    ILog parentLog

    optional logger to attach to

    Returns
    Type Description
    ToSic.Sxc.Blocks.IBlockBuilder

    An initialized CMS Block, ready to use/render

    | Improve this Doc View Source

    DynamicCode(IBlockBuilder)

    Retrieve a helper object which provides commands like AsDynamic, AsEntity etc.

    Declaration
    [Obsolete("This is obsolete in V13 but will continue to work for now, we plan to remove in v15 or 16. Use the IDynamicCodeService or the IRenderService instead.")]
    public static IDnnDynamicCode DynamicCode(IBlockBuilder blockBuilder)
    Parameters
    Type Name Description
    ToSic.Sxc.Blocks.IBlockBuilder blockBuilder

    CMS Block for which the helper is targeted.

    Returns
    Type Description
    IDnnDynamicCode

    A Code Helper based on IDnnDynamicCode

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX