Content List Portlet

From Sense/Net Wiki
Jump to: navigation, search
  •  
  •  
  •  
  •  
  • 100%
  • 6.0
  • Enterprise
  • Community
  • Planned

Overview

Document Library

Sense/Net ECMS is all about content. Creating, modifying and displaying content is essential part of this system and displaying multiple content is the most commonly used feature of Sense/Net. Content List Portlet is one of the three main portlets aiding this task (the other ones are the Content collection Portlet that can be used to display child items of a container and the Content query presenter Portlet that is built on a simple Content Query).

Details

Content List Portlet is able to display content stored in a Content List. The most common examples are task or memo lists, document or image libraries. The portlet needs two UI elements to work:

  • a view frame that displays a toolbar
  • one ore more views to display the content itself

For all available settings check the Properties section.

Content List Portlet properties

Context binding

Content List Portlet is a context bound portlet. This means you can (and have to) define a context to work with. This is by default the current list or other container that the user is browsing but you can select any other container in the Sense/Net Content Repository.

Content to display

By default the Content List Portlet displays the children of the current context. You can customize this behavior by selecting a custom root on the Context binding property page and setting the properties of a Content List View. Displayed content can be filtered by fine-adjusting the selected view or creating a new view. A view can also define whether children of system folders should be visible or not.

Content List views

Content List Portlet is a little bit different from the other two portlets that display multiple content. In case of content lists the portlet does not have a single view to display the content. Content Lists are special container content that may have their own views that can be selected from the View menu on the right end of the toolbar.

View selection

Properties

Own properties

Property Property name for embedding Possible values Description
View frame ViewFrame Provides toolbar controls (buttons and menus) over the List and loads the selected View
Default view DefaultView Name of the default view. Can be an absolute path (e.g. /Root/Global/renderers/myview.ascx) or a local name (e.g. Default.ascx). If you do not leave this empty, this setting will override the setting on the Content List itself.

Inherited properties

User interface

Property Property name for embedding Possible values Description
Portlet title Title text Sets the visible title of the current portlet. Title header visibility is controlled with the Appearance property
Appearance ChromeType Default
None
TitleAndBorder
TitleOnly
BorderOnly
Controls title and border visibility. By default both are visible
Custom CSS class(es) SkinPreFix text When set portlet container div gets an extra css class. Ie. 'skinexample' adds css class 'skinexampleSkin' to container div

Context binding

Property Property name for embedding Possible values Description
Bind Target BindTarget Unselected
CurrentContent
CurrentSite
CurrentPage
CurrentUser
CurrentStartPage
CustomRoot
CurrentWorkspace
Breadcrumb
CurrentList
Select the bound content. Set it to CustomRoot to select a content with absolute path regardless of the context
Custom root path CustomRootPath Root relative Repository path Define bound content with absolute path when Bind Target is set to CustomRoot
Ancestor selector index AncestorIndex positive whole number Set the bound content to the ancestor of Bind Target specified by index. 0 leaves the bound content as specified above, 1 selects parent, higher value selects higher order ancestor
Relative content selector path RelativeContentPath relative Repository path Sets the bound content relative to the above settings with a relative path. Ie.: 'CustomChildFolder/CustomNode' selects 'CustomNode' from Bind Target's 'CustomChildFolder' child folder. Relative to ancestor when Ancestor selector index is set
Reference field name ReferenceFieldName text Selects a referenced content of the bound content. Ie.: 'Manager' selects the Manager if the Bind Target above is the current workspace.

Cache

Property Property name for embedding Possible values Description
Portlet is cached Cacheable true/false If set the output of the portlet will be cached
Portlet is cached for... CacheableFor VisitorsOnly
Everyone
In case of 'Everyone' the output of the portlet will be cached for logged in users as well.
Portlet context influences caching CacheByContext true/false Defines whether the current context path is included in the cache key. When unchecked portlet output is preserved regardless of the page's current context content or request path. Check it if you want to cache portlet output depending on the requested context content.
Request path influences caching CacheByPath true/false Defines whether the requested content path is included in the cache key. When unchecked portlet output is preserved regardless of the page's current context content or request path. Check it if you want to cache portlet output depending on the requested context content.
Url query params influence caching CacheByParams true/false Defines whether the url query params are also included in the cache key. When unchecked portlet output is preserved regardless of changing url params
Language influences caching CacheByLanguage true/false Defines whether the language code is also included in the cache key. When unchecked portlet output is preserved regardless of the language that the users use to browse the site. If set, a different output will be cached for any language the users visit the site on.
Sliding expiration SlidingExpirationMinutes positive whole number Given in seconds. The portlet is refreshed when it has not been accessed for the given time period
Absolute expiration AbsoluteExpiration positive whole number Given in seconds. The portlet will be refreshed periodically with the given time period
Custom cache key CustomCacheKey text Defines a custom cache key independent of requested path and query params. Useful when the same static output is rendered at various pages.
Debug Debug true/false Check this property to show debug info about portlet cache state at the bottom of the portlet's layout

for Portal builders

The easiest way to use the Content List Portlet is to place it onto a portlet page. For more details check the following article:

Managing Content List views

Content Lists are special container content that may have their own views in a System Folder called Views under the list.

Content List views

Page template and control embedding

Use the following markup if you want to embed the portlet into your Page Template or custom control. The attributes/options are the same as seen in the Properties section above (don't forget to include a unique ID and the runat="server" attribute).

<snpe:ContentListPortlet Title="MamoList" ChromeType="BorderOnly" 
   BindTarget="CurrentList" ViewFrame="/Root/System/SystemPlugins/ListView/ViewFrame.ascx" 
   ID="MemoList" runat="server" />

Example/tutorials

Related links

References

There are no external references for this article.