sensenet 7: this article has aon the new community site.
Where can I find the content?
Content are stored in the Content Repository - the storage layer for the portal. The Content Repository is basically a tree structure of the various stored content of the protal. A specific Content is identified by a unique number (id) and also by its path in the Content Repository - the relative path to the root content. The root of the Content Repository is a root content at /Root path, and all other content is placed somewhere under this root content - for example the login page for the default site is placed at /Root/Sites/Default_Site/login.
How should I imagine a Content?
Every Content is built up of Fields (a user Content for example has name Field and password Field). Different types of content can be created by defining a different set of Fields. The type of the the Content is called the Content Type and defines the set of Fields a Content possesses and also the behavior of the Content. The set of Fields the type defines is reusable, meaning different types can be created by deriving from already defined types and the newly created type will obtain the Fields of its parent type. For example: a File Content has - among a couple others - a name Field for storing the name of the file and a binary Field for storing the binary data of the file, and an Image Content (whose type is a child type of the File Content Type) also have a name (for the name of the image) and a binary Field (for the image pixel data) and a couple of other fields, too - that a simple File does not contain: Keywords (for making the image searchable), DateTaken (for storing the info of when the picture was taken in case it is a photo), etc.
How does a content look like?
A single Content can be presented in many forms:
|You can visually see the content when they are enlisted in a list or in a tree, for example in Content Explorer, the administrative surface of the portal.||Also, the individual content can be edited, in this case mostly you will be presented a surface where you can edit the content's fields.||Besides, the content can be presented in any visual form with the aid of Content Views or XSLT Renderers.|
The way a content looks like mainly depends on the scenario it is used in (a folder for example is used to contain other content, so it shows the list of its children, whereas an article represents some kind of textual information and pictures so it shows the visually formatted text and contained images), but the look of any kind of content can be fully customized.
How can I store / browse my data in the portal?
The Content Explorer administrative surface of the portal provides a handful of tools to manage content. You can create new content of the defined Content Types and fill their fields with data, you can define new Content Types of any kind, you can copy, move, delete, rename content and upload / download files into / from the Content Repository. It is also possible to Import large amount of data from file system into the Content Repository (and also to Export them from the Content Repository into the file system).
How can I reference a content?
Content can be referenced most easily via an url built from the site url and the path of the Content. For example you can request the content under /Root/YourContents/FooterContent on the default install with the http://localhost/Root/YourContents/FooterContent url. In this case the content will be displayed using its Browse view. To edit the content the action=Edit url parameter can be used: typing http://localhost/Root/YourContents/FooterContent?action=Edit will show the Content in Edit mode and thus the content's fields can be edited right away. The mechanism that allows Content to be requested via their Content Repository paths and an action parameter is defined by the Smart Application Model. The Smart Application Model makes it possible to create custom actions for the Content. You can check the most common available actions on a content in Explore - they are listed at the top part of the page. To view a content in Explore you can
- open Explore via the Portal Remote Control (PRC) and navigate to the content,
- request the Content in the browser with its url http://localhost/Root/YourContents/FooterContent and open Explore via the PRC - the Explore surface will immediately open at the Content
- type in http://localhost/Explore.html#/Root/YourContents/FooterContent
The following are some example content from the Content Repository of the default install:
- /Root/YourDocuments/PressRoom/SenseNet6-Logos.pdf: this is a PDF format File. You can upload / download files like this in Explore.
- /Root/YourDocuments/PressRoom: this is the Folder containing the above PDF. You can create folders anywhere in Explore.
- /Root/Global/images/logo_portalengine.gif: this is an Image. When you browse it, you will see the image itself. When you edit it, you can set the values of the fields of this content.
- /Root/Sites/Default_Site/infos/features/calendarinfo: this is a WebContentDemo content specially created to hold information of the yellow info boxes visible on the demo site. This particular content stores the text that is displayed at the Event Calendar feature of the demo site.
- /Root/IMS/Demo/Managers/alexschmidt: this content is a User. The login name of the account it represents is alexschmidt, and the password can be set by editing this content and setting the value for the password field.
- /Root/IMS/BuiltIn/Portal/Administrators: this is a Group for the administrators of the portal. Users can be added to this group by editing the group and adding them to the members field. Anyone included in the members list will have administrator privileges on the portal.
- /Root/Sites/Default_Site/login: this is a simple Page that is displayed when you are not logged in but you need to be logged in to browse the requested content.
- /Root/System/Schema/ContentTypes/GenericContent/File/Image: this is a ContentType describing the structure and behavior if Image Content Types. As you can see, the Content Type is a content itself.
- Content - for Developers
- How to add/modify/delete content in Content Explorer
- Content Explorer
- Content Repository
- Content Type
- Content View
- XSLT Renderer
There are no related external articles for this article.