Fork me on GitHub
2sxc 9.43 for DNN 7 to 9
Website Builder, Content Manager, App-System: open-source and fun

Getting Started with 2sxc

This page should help users who want to do their first baby steps using 2sxc. 

2sxc can do thousands of things and lets you leverage so many cool technologies like AngularJs or NPM that it may feel a bit overwhelming at first. So here we would like to guide you - so you can get started and become productive very, very quickly. 

This page is meant for web designers (people with HTML / CSS skills) who want to create awesome designed web sites and help their editors create awesome content. 

Important notes - read this first!

  1. We linked many of the terms to point to further information - not because you should read it all, but to help you in case you do want to read more about this. 
  2. This getting-started is meant for the Content module and not with the App module. Creating/modifying Apps is something we recommend after you learned to work with  content. 

1. Get to know the editor experience and understand content

Before you start creating something we really recommend that you spend a bit of time using 2sxc. It will help you better understand certain aspects of 2sxc. To do this, we recommend that you create an empty DNN-Portal, install 2sxc and also install the default content-templates and give them a test run. Ideally by the end of this learning-block you'll understand things like:

  1. difference between content (text, images, etc.) and the design (the template)
  2. difference between various field types (like text-single-line, multi-line, wysiwyg, numbers, GPS-coordinates and more)
  3. what a Content-Type is (a set of fields like a Person with 7 fields etc.)
  4. demo-content-items - these which appear when you add the module to show you what the template will look like
  5. adding, editing and deleting modules and content
  6. using 1 content-item or a list (like when adding lists of persons)
  7. when using lists - how to add new items, re-arrange them and more
  8. re-using existing content (to show the same person in another place again)
  9. separation of content from the presentation settings
  10. automatic image cropping and resizing
  11. automatic file (image/document) tracking (when referring to an image as File:17 instead of as /portals/0/...)
  12. how a single content-type (like Person) can have many different ways of being shown (multiple templates)

It may seem so trivial that you may want to skip this step, but you really shouldn't. We often see questions which can be solved with such basic features (like using Presentation-items). Note that this will also help you think in content-management-terms instead of in word-editor-mode

2. Start by changing existing templates

Once you've figured out how everything works you'll start to see the patterns/concepts behind everything. They mainly are:

  1. Separate content, template and presentation-rules
  2. Separate work into the role of the content-editor and the web-designer
  3. Let the template do the hard work

Now you can start changing some of the templates to discover how things work. Just to help you get started, let me tell you that there are 2 different technologies to create templates on the server:

  1. Tokens - these use placeholders like [Content:Title] and mix in with normal HTML. They are much simpler to understand and use - also because they are more limited in what can be done. But if you're getting started it's probably easier to work with these. 
  2. Razor - with placeholders like @Content.Title which is actually real programming code (C#). More advanced templates need more features so they will be created in Razor. Note that very often you'll see Razor templates which do some really advanced templating - so it looks advanced because it is, not because Razor is so hard to use :)

So it's best to just start with modifying some existing Token-Templates - you can learn a lot by also reading Token Templates and Views