IComponentElementShare Method
|
Unembeds the content off the component and turn it into an actual
Page object and place it under the given root.
Namespace:
Ingeniux.CMS
Assembly:
Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 10.6.308
Syntax IPage Share(
IPage rootPage,
bool placeAtEnd = false,
IPageVersion overrideContent = null,
string overrideName = ""
)
Function Share (
rootPage As IPage,
Optional placeAtEnd As Boolean = false,
Optional overrideContent As IPageVersion = Nothing,
Optional overrideName As String = ""
) As IPage
IPage^ Share(
IPage^ rootPage,
bool placeAtEnd = false,
IPageVersion^ overrideContent = nullptr,
String^ overrideName = L""
)
abstract Share :
rootPage : IPage *
?placeAtEnd : bool *
?overrideContent : IPageVersion *
?overrideName : string
(* Defaults:
let _placeAtEnd = defaultArg placeAtEnd false
let _overrideContent = defaultArg overrideContent null
let _overrideName = defaultArg overrideName ""
*)
-> IPage
Parameters
- rootPage
- Type: Ingeniux.CMSIPage
Root page to place the extracted component under - placeAtEnd (Optional)
- Type: SystemBoolean
Specifies whether or not to place the component at the root page's children. Default is to place in the front. - overrideContent (Optional)
- Type: Ingeniux.CMSIPageVersion
The page version content to replace the embed content of this component. When specified, this content will be used to create the shared component instead. - overrideName (Optional)
- Type: SystemString
[Missing <param name="overrideName"/> documentation for "M:Ingeniux.CMS.IComponentElement.Share(Ingeniux.CMS.IPage,System.Boolean,Ingeniux.CMS.IPageVersion,System.String)"]
Return Value
Type:
IPageThe extracted component, null if component is not in embedded mode
Exceptions Exception | Condition |
---|
ArgumentException | When root page is null |
InvalidOperationException | When current user doesn't have [!:Ingeniux.CMS.Enums.EnumUserRight.IGX_USER_RIGHT_CAN_EMBED_UNEMBED_COMPONENTS] rights, or user doesn't have
write access to root page node |
See Also