Editor Portlet

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

Overview

Displays the Fields of a Content for editing
The Editor Portlet is a Portlet that displays all the visible Fields of a Content enabling the user to change and save them.

Details

With Editor Portlet you can display a Content's Fields for editing easily. By default the portal renders the Content Fields with the default Edit Content View, but you can also define a path to a custom Content View. This option enables you to make editable only those fields which you want, without the need of changing Field Settings in CTDs.

The Editor Portlet is a Context bound Portlet, thus it can take advantage of the Smart Application Model when building Smart Pages. You can easily define the Content to be edited using context binding parameters.

Properties

Own properties

Property Property name for embedding Possible values Description
Contentview path ContentViewPath Repository path Select a custom Contentview to use it. If left empty the Application Model will find a default view to use.

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 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
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

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 logged in user CacheableForLoggedInUser true/false If set the output of the portlet will be cached even if the user is logged in.
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 minutes. The portlet is refreshed when it has not been accessed for the given minutes
Absolute expiration AbsoluteExpiration positive whole number Given in seconds. The portlet will be refreshed periodically with the given time period
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

PageTemplate embedding code

If you want to embed your Editor portlet into your pagetemplates somewhere, look at the following markup. The attributes/options and the range of their accepted values are the same as above. (Note the embedding name of the portlet and don't forget to include a unique ID and runat="server" attributes!)

<snpe:ContentEditorPortlet
   title="Editor Portlet"
   ChromeType="TitleAndBorder"
   BindTarget="CustomRoot"
   CustomRootPath="/Root/Sites/Default_Site/NewsDemo/Internal/Family_Day"
   id="EditorPortlet" 
   runat="server" />

Related links

References