Fork me on GitHub
2sxc 9.6 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

Simple Apps allow quick deployment, installation, testing and clean removal without side effects. Install an app, adapt to your needs - simple and standardized, using tokens and razor. (added 06.00.00)
Tags: Entities, Lists, Linking, Razor, Token, Multi-Language, Apps,

The user can choose whether he wants to add an item to a list and immediately show a demo-record (with the [+] button), or just open a dialog which doesn't add anything if he cancels. (added 05.05.01)
Tags: Apps, Entities, Lists, Lists with Details, new in 6.x,

Now you can easily get all Categories with App.Data["Category"] or all questions with App.Data["Question"]. You can also use this as the input for further filtering, sorting and more. (added 06.01.00)
Tags: Apps, Content Types, Data and Data Sources, Database, Entities, For experts, Lists, Multi-Language, new in 6.x,

Any visual query you create can also be used from razor using this property. (added 07.00.00)
Tags: Data and Data Sources, Apps, Visual Query - Data Pipeline Designer, For experts, DataSource, Entities, Query (Data/Visual), New in 7.x,

Use simple tokens like [QueryString:Person] or [User:UserId] to configure data pipelines. This even allows for fallback-scenarios (like when the querystring doesn't have a configuration, like [QueryString:AppId|[AppSettings:DefaultAppId]] (added 06.00.00)
Tags: Data and Data Sources, Database, Entities, Linking, Lists with Details,

A content-type defines the structure of an information-set. A news-item has a title, body and date, whereas a person also needs first/last names, birthday, etc. (added 01.00.00)
Tags: Field Configuration, Entities, Content Types, For beginners,

Using simple server-side commands, you can create entities, edit and delete them in code. Thanks to this feature, you can create your own edit-dialogs or partial dialogs for workflows and similar. Also create simple or complex feedback forms and more. (added 06.05)
Tags: Apps, Entities, Razor, new in 6.x, Database, For experts, WebApi,

Supports placing all data in the module into the DNN-Search. This works for simple items (like title/text/image) as well as for lists. The special feature is that it allows you to change how the index works. You could specify an alternate (detail-page) url for each item. (added 06.02.00)
Tags: Apps, Data and Data Sources, Entities, For experts, Razor, new in 6.x, Lists, Lists with Details, Search,

Now you can easily add any kind of data to the pipeline with the DataTableDataSource. This is great for adding XML, RSS, NoSQL sources, Resx-files and much, much more. (added 06.00.06)
Tags: Apps, Data and Data Sources, Database, Entities, For experts, Import/Export, Lists, Lists with Details, new in 6.x, Razor,

All data (entities) are versioned automatically and can easily be restored whenever you need a previous version. (added 06.00.00)
Tags: Data and Data Sources, Database, Entities, new in 6.x,

Export/Import is now available and handles a variety of complex scenarios. It can match languages, re-link files and much more. (added 05.04.00)
Tags: Import/Export, Content Types, Entities, Images, Linking, Multi-Language,

All content from 2sxc is 100% cached by default, meaning it will not access the database at all. (added 04.02.00)
Tags: Entities, Apps, For experts, Data and Data Sources,

2sxc provides an extensive, advanced content import/export system to help you migrate from other tools or import data from Excel and other lists. (added 07.00.00)
Tags: New in 7.x, Entities, Data and Data Sources, Import/Export,

You can use strongly typed data sources with safe configuration to supply your templates with any data you need. (added 05.00.00)
Tags: Apps, Content Types, Database, Entities, For experts, Razor, new in 5.x, new in 6.x, Data and Data Sources,

Sometimes you want to pre-fill a new Entity with existing information - like the current date, the users name, or data from another list like a file-ID or infos from an XML-Stream. This is now possible. (added 05.05.01)
Tags: Entities, Lists, Lists with Details, Apps, new in 6.x,

Now you can connect entities (like authors and books) in awesome ways. Also extremely usefull for tagging and similar scenarios. (added 05.03.00)
Tags: Lists, Linking, Field Configuration, Entities, Razor, Relationships,

The new RelationshipFilter helps in list-pages to find all items with a category and similar scenarios. (added 06.01.00)
Tags: Data and Data Sources, Entities, Razor, Linking, Lists with Details,

It was always possible to use SQL data before, but with the new data sources it actually is fun to use and fully integrated. (added 06.00.06)
Tags: Apps, Database, Data and Data Sources, Entities, For experts, Lists, Razor, new in 6.x,

(added )
Tags: Entities, Database, For experts, new in 6.x, Data and Data Sources,

Use this to filter / find one or more items comparing values like name, category etc. Since 08.05 it also has many comparisons like contains, between, etc. (added 07.00.00)
Tags: Data and Data Sources, DataSource, Entities, For experts, Lists, Lists with Details, new in 8.x, Query (Data/Visual), Visual Query - Data Pipeline Designer,

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"]);
}
2serve . 2invent . 2create is 2be.