Fork me on GitHub
2sxc 9.33 for DNN 7 to 9
Website Builder, Content Manager, App-System: open-source and amazing
You are here: Home  >  Docs

2sxc Documentation

We are currently re-working the documentation structure. The new structure will be:

  1. API documentation for Razor/C#, JavaScript (incl. $2sxc and $cms), WebServices, Edit-UIs etc. will be found on the 2sxc wiki.
  2. Features-documentation will be found on this page
  3. Learning tutorials and concepts will be in Learn
  4. Blogs, examples etc. are of course in Blog

Features of 2SexyContent with Details and How-To-Use

Filter by

To access data from 2SexyContent inside JavaScript, just enable the publish-feature and you will get a JSON-feed with all the data. We recommend to use this together with the JavaScript-API giving you a seamless Sexy-JavaScript experience! (added 05.02.00)
Tags: JavaScript, Design, Lists,

AngularJS Apps in DNN are a bit different than outside DNN, mainly because they are not alone (MAP instead of SPA) and also need to know which module they belong to. 2sxc automates the initialization of everything. (added 07.00.00)
Tags: AngularJS, For experts, JavaScript, New in 7.x, WebApi,

2SexyContent automatically bundles and minifies your secondary files as you need it. Also called Client-Dependency in DNN or Enable Optimizations in 2sxc. (added 04.00.00)
Tags: Design, HTML and CSS, JavaScript,

This can now be done in code. (added 06.01.00)
Tags: JavaScript, Razor, new in 6.x,

The JavaScript API provides various automation helping you connect data from 2SexyContent with JavaScript. (added 04.00.00)
Tags: JavaScript, Apps, Data and Data Sources, For experts,

Amazingly simple integration with knockoutJS. An amazingly simple data-backend using 2SexyContent, a cool JS-Framework to play with the output - all connected with the Data-Pipeline of 2SexyContent. (added 04.00.00)
Tags: JavaScript, Import/Export, Lists, Lists with Details, Razor, Token, Apps,

Use simple HTML-tags or javascript to create inline or hovering add and edit-buttons (added 06.00.00)
Tags: HTML and CSS, JavaScript, Token, Razor, Apps, new in 6.x, New in 7.x, new in 8.x,

To use module-data like ModuleID in [Token] templates (important for JSON-feeds, Details-Links and more) we added a [Module:...] value provider. (added 05.02.00)
Tags: HTML and CSS, Token, Linking, JavaScript,

Now you can use npm (nodeJS package manager) and Gulp/Grunt when developing your 2sxc-Apps. This helps you create better code and automate lots of working steps. (added 07.02.00)
Tags: New in 7.x, AngularJS, JavaScript, For experts, for javascript developers,

Thanks to new permissions you can give anonymous users access to Queries or even allow creating content-items (like feedback forms). (added 07.01.00)
Tags: Admin and Edit Dialogs, Apps, AngularJS, For experts, WebApi, Security, JavaScript, Visual Query - Data Pipeline Designer,

Now 2sxc offers a simple REST API so that you can access content like .../app-content/Feedback/342 to perform all kinds of actions using JavaScript. (added 07.01.00)
Tags: AngularJS, Content Types, Import/Export, JavaScript, New in 7.x, WebApi,

2sxc comes with two built in view engines. The Token-Engine uses simple placeholders like [Content:Title] and allows you to do amazing things - with very simple technologies. (added 01.00.00)
Tags: Token, Design, For beginners, for designers, for javascript developers, AngularJS, HTML and CSS, JavaScript, Lists, Multi-Language, Visual Query - Data Pipeline Designer,

Thanks to the fully automated WebAPI integration you can easily include and distribute your WebAPIs with you Apps. (added 06.05)
Tags: Apps, For experts, Import/Export, JavaScript, new in 6.x, WebApi, Razor, Token,

Look inside

Content Item

These are the values a content-editor can manage.
Name Type Value
Title System.String App Information - Object and Token
Teaser System.String Using the App-Object you can access path information, settings and resources.
AddedInVersion System.String 05.05.00
DescriptionLong System.String <p>This new variable / token was introduced to help templates become flexible.&nbsp;</p> <p>Usage Tokens</p> <ul> <li>[App:Path]/scripts/knockout.js</li> <li>[App:PhysicalPath]</li> <...
ImageTeaser System.String
Image System.String
DocumentedOnPage System.String Page:463
StatusDocumentation System.String 3
StatusDevelopment System.String 10
DesignedContent ToSic.Eav.Data.EntityRelationship
ReplacementDocs null
Tags ToSic.Eav.Data.EntityRelationship 1840,1841,1910,2440
RelatedFeatures ToSic.Eav.Data.EntityRelationship 1831
DemoAppGuid System.String
DemoPage System.String


Presentation Item

These are additional, optional presentation instructions a content-editor can manage. If none are entered, a default set (predefined by the designer) will be used.

No Presentation parameters specified, using default presentation for this item.


Template file

@using DotNetNuke.Entities.Modules
@using ToSic.SexyContent.Search
@using ToSic.Eav.DataSources
@functions
{
    public override void CustomizeData()
    {
        // Don't customize anything, nothing to customize in this case
        //throw new Exception("demo");
        var relationshipFilter = CreateSource<RelationshipFilter>(Data["Default"]);
        relationshipFilter.Relationship = "Tags";
        relationshipFilter.Filter = "[QueryString:Tag]";
        if (relationshipFilter["Default"].List.Count() > 0)
        {
            Data.In["Default"] = relationshipFilter["Default"];
        }
    }

    /// <summary>
    /// Populate the search - ensure that each entity has an own url/page
    /// </summary>
    /// <param name="searchInfos"></param>
    /// <param name="moduleInfo"></param>
    /// <param name="startDate"></param>
    public override void CustomizeSearch(Dictionary<string, List<ISearchInfo>> searchInfos, ModuleInfo moduleInfo, DateTime startDate)
    {

        foreach (var si in searchInfos["Default"])
        {
            si.QueryString = "mid=" + moduleInfo.ModuleID + "&feature=" + si.Entity.EntityId;
        }
    }


}@if (Request.QueryString["feature"] == null)
{
    // Note: the code inside _List.cshtml could also be inserted right here
    // I just took it out to make everything a bit easier to read
    // The Render-Page will execute that CSHTML and include all data that is in the current view
	@RenderPage("_2SexyContent Feature - List.cshtml");
}
else
{
    // This one will also execute another CSHTML, but will add a variable with the URL-parameter
	@RenderPage("_2SexyContent Feature - Details.cshtml", Request.QueryString["Feature"]);
}