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

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,

Sometimes you just want to add piece of HTML to your page that will always be the same - like a decorative line. Since you're not adding any data, there is no content-type to choose from. This is where the Design-Element is used. (added 01.00.00)
Tags: Content Types, Design, for designers, HTML and CSS, Images,

Use this input-type to provide editors with an icon picker. It also provides icon search and more. (added 08.03.07)
Tags: for designers, Design, Editing, Field Configuration, new in 8.x, Images, HTML and CSS,

Awesome Image-Resizer with really neat features. (added 05.03.00)
Tags: Images, HTML and CSS, For beginners, Design, Token, Razor, Linking, Lightbox,

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,

Point to a 2SexyContent-Page with some extra parameters, and all HTML around the 2SexyContent will disappear. This helps create details-pages in lightboxes or dynamic areas of the HTML, or even allows you to produce a manual JSON-Feed without any HTML around it. (added 04.00.00)
Tags: Design, HTML and CSS, Linking,

Links will still work even after moving pages and files in DNN. They also still work when you rename pages or files. (added 05.04.00)
Tags: Field Configuration, HTML and CSS, Linking, Import/Export, Multi-Language,

All views in an app can be protected using permissions - thereby ensuring that certain views can only be used by editors / admins. This allows you to create edit/admin-UIs as needed. (added 07.01.00)
Tags: Apps, Admin and Edit Dialogs, For experts, HTML and CSS, New in 7.x,

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,

Create vCards based on 2SexyContent-Data. Very easy to use. (added 05.02.00)
Tags: Design, HTML and CSS, Images, Import/Export, Linking,

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"]);
}