Interface CMLinkable
- All Superinterfaces:
com.coremedia.objectserver.dataviews.AssumesIdentity
,BelowRootNavigation
,CMLocalized
,CMObject
,com.coremedia.objectserver.beans.ContentBean
,HasViewTypeName
,Linkable
,com.coremedia.blueprint.common.datevalidation.ValidityPeriod
- All Known Subinterfaces:
CMAction
,CMArticle
,CMAudio
,CMChannel
,CMCollection<T>
,CMContext
,CMDownload
,CMDynamicList<T>
,CMExternalLink
,CMGallery<T>
,CMHasContexts
,CMHTML
,CMImageMap
,CMInteractive
,CMLocTaxonomy
,CMMedia
,CMNavigation
,CMPerson
,CMPicture
,CMPlaceholder
,CMQueryList
,CMSitemap
,CMSpinner
,CMTaxonomy
,CMTeasable
,CMTeaser
,CMVideo
,CMVisual
CMLinkable is the base type for each document which can be referenced as standalone content or navigation unit.
Represents the document type CMLinkable
.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Name of the document property 'externallyDisplayedDate'.static final String
Name of the document property 'htmlDescription'.static final String
Name of the document property 'htmlTitle'.static final String
Name of the document property 'keywords'.static final String
Name of the document property 'linkedSettings'.static final String
static final String
Name of the document property 'locationTaxonomy'.static final String
Name of the ContentType
'CMLinkable'.static final String
Name of the document property 'resourceBundles2'.static final String
Name of the document property 'segment'.static final String
Name of the document property 'subjectTaxonomy'.static final String
Name of the document property 'title'.static final String
Name of the document property 'validFrom'.static final String
Name of the document property 'validTo'.static final String
Name of the document property ' viewtype'.Fields inherited from interface com.coremedia.blueprint.common.contentbeans.CMLocalized
LOCALE, MASTER, MASTER_VERSION
Fields inherited from interface com.coremedia.objectserver.beans.ContentBean
METADATA_PROPERTIES_PREFIX
-
Method Summary
Modifier and TypeMethodDescriptionMap<String,
? extends com.coremedia.cae.aspect.Aspect<? extends CMLinkable>> Deprecated.since 1907.1; Implement optional features as extensions.List<? extends com.coremedia.cae.aspect.Aspect<? extends CMLinkable>>
Deprecated.since 1907.1; Implement optional features as extensions.Returns the contexts of this CMLinkable.Returns the value of the document propertyEXTERNALLY_DISPLAYED_DATE
.Returns the value of the document propertyHTML_DESCRIPTION
.Returns the value of the document propertyHTML_TITLE
.Returns the value of the document propertyKEYWORDS
.Returns allCMSettings
linked settings.Collection<? extends CMLinkable>
Returns theLocale
specific variants of thisCMLocalized
com.coremedia.cap.struct.Struct
Return local settings as a Struct.Returns the value of the document propertyLOCATION_TAXONOMY
.Returns the value of the document propertyCMLocalized.MASTER
.Returns the value of the document propertyRESOURCE_BUNDLES2
.Returns the value of the document propertySUBJECT_TAXONOMY
.getTitle()
Returns the title to be used in the head meta data.Returns the value of the document propertyVALID_FROM
.Returns the value of the document propertyVALID_TO
.Map<Locale,
? extends CMLinkable> Returns the variants of thisCMLocalized
indexed by theirLocale
Returns the first value of the document propertyVIEWTYPE
.boolean
Always returnsfalse
.Methods inherited from interface com.coremedia.objectserver.dataviews.AssumesIdentity
assumeIdentity
Methods inherited from interface com.coremedia.blueprint.common.contentbeans.BelowRootNavigation
getRootNavigations
Methods inherited from interface com.coremedia.blueprint.common.contentbeans.CMLocalized
getCountry, getLang, getLocale, getMasterVersion
Methods inherited from interface com.coremedia.blueprint.common.contentbeans.CMObject
getAspectsProvider, getContentId, getUuid
Methods inherited from interface com.coremedia.objectserver.beans.ContentBean
getContent, getContentBeanFactory
Methods inherited from interface com.coremedia.blueprint.common.navigation.HasViewTypeName
getViewTypeName
Methods inherited from interface com.coremedia.blueprint.common.navigation.Linkable
getLocale, getSegment
-
Field Details
-
NAME
Name of the ContentType
'CMLinkable'.- See Also:
-
VIEWTYPE
Name of the document property ' viewtype'.- See Also:
-
LOCAL_SETTINGS
- See Also:
-
KEYWORDS
Name of the document property 'keywords'.- See Also:
-
HTML_DESCRIPTION
Name of the document property 'htmlDescription'.- See Also:
-
HTML_TITLE
Name of the document property 'htmlTitle'.- See Also:
-
SEGMENT
Name of the document property 'segment'.- See Also:
-
TITLE
Name of the document property 'title'.- See Also:
-
LINKED_SETTINGS
Name of the document property 'linkedSettings'.- See Also:
-
VALID_FROM
Name of the document property 'validFrom'.- See Also:
-
VALID_TO
Name of the document property 'validTo'.- See Also:
-
EXTERNALLY_DISPLAYED_DATE
Name of the document property 'externallyDisplayedDate'.- See Also:
-
SUBJECT_TAXONOMY
Name of the document property 'subjectTaxonomy'.- See Also:
-
LOCATION_TAXONOMY
Name of the document property 'locationTaxonomy'.- See Also:
-
RESOURCE_BUNDLES2
Name of the document property 'resourceBundles2'.- See Also:
-
-
Method Details
-
getMaster
CMLinkable getMaster()Returns the value of the document propertyCMLocalized.MASTER
.- Specified by:
getMaster
in interfaceCMLocalized
- Returns:
- a
CMLinkable
object
-
getVariantsByLocale
Map<Locale,? extends CMLinkable> getVariantsByLocale()Description copied from interface:CMLocalized
Returns the variants of thisCMLocalized
indexed by theirLocale
- Specified by:
getVariantsByLocale
in interfaceCMLocalized
- Returns:
- the variants of this
CMLocalized
indexed by theirLocale
-
getLocalizations
Collection<? extends CMLinkable> getLocalizations()Description copied from interface:CMLocalized
Returns the
Locale
specific variants of thisCMLocalized
- Usage:
Add elements for each variant excluding self (self is of type
Page
in this example).- Freemarker:
-
<#if (self.content.localizations)?has_content> <#assign localizations=self.content.localizations![] /> <#list localizations as localization> <#if localization.locale != self.content.locale> <link rel="alternate" ... /> </#if> </#list> </#if>
- JSP:
-
<c:set var="locales" value="${self.content.localizations}"/> <c:if test="${not empty locales}"> <c:forEach var="localization" items="${locales}"> <c:if test="${localization.locale != self.content.locale}"> <cm:link var="localitationLink" target="${localization}"/> <link rel="alternate" ... /> </c:if> </c:forEach> </c:if>
- Specified by:
getLocalizations
in interfaceCMLocalized
- Returns:
- the
Locale
specific variants of thisCMLocalized
-
getAspectByName
@Deprecated Map<String,? extends com.coremedia.cae.aspect.Aspect<? extends CMLinkable>> getAspectByName()Deprecated.since 1907.1; Implement optional features as extensions.Description copied from interface:CMObject
Returns a Map from aspectIDs to Aspects. AspectIDs consists of an aspectname with a prefix which identifies the plugin provider.
- Usage:
Access an aspect named osmPlugin.
- Freemarker:
-
<#assign osmSocialPlugin=self.aspectByName['osmPlugin'] />
- JSP:
-
<c:set var="osmSocialPlugin" value="${self.aspectByName['osmPlugin']}"/>
- Specified by:
getAspectByName
in interfaceCMLocalized
- Specified by:
getAspectByName
in interfaceCMObject
- Returns:
- a Map from aspectIDs to Aspects
-
getAspects
Deprecated.since 1907.1; Implement optional features as extensions.Description copied from interface:CMObject
Returns a list of all
Aspect
from all available PlugIns that are registered to this contentbean.- Usage:
Add all aspects with view
asHead
.- Freemarker:
-
<#list self.aspects as aspect> <@cm.include self=aspect view="asHeader"/> </#list>
- JSP:
-
<c:forEach items="${self.aspects}" var="aspect"> <cm:include self="${aspect}" view="asHeader"/> </c:forEach>
- Specified by:
getAspects
in interfaceCMLocalized
- Specified by:
getAspects
in interfaceCMObject
- Returns:
- a list of Aspects
-
getViewtype
CMViewtype getViewtype()Returns the first value of the document property
VIEWTYPE
.- Usage:
Use given layout as view.
- Freemarker:
-
<#assign recursiveInclude=cm.localParameter("recursiveInclude", false) /> <#assign layout=(self.viewtype.layout)!"" /> <#if layout?has_content && !recursiveInclude> <@cm.include self=self view="[${layout}]" params={"recursiveInclude": true} /> <!-- ... ---> </#if>
- Returns:
- first value of document property of type
CMViewtype
-
getKeywords
String getKeywords()Returns the value of the document property
KEYWORDS
.- Usage:
Add keywords to meta information.
self
is of typePage
.- Freemarker:
-
<#if self.content.keywords?has_content> <meta name="keywords" content="${self.content.keywords}" /> </#if>
- JSP:
-
<c:set var="keywordsList" value="${self.content.keywords}"/> <c:if test="${not empty keywordsList}"> <meta name="keywords" content="<c:out value='${keywordsList}'/>"/> </c:if>
- Specified by:
getKeywords
in interfaceLinkable
- Returns:
- the value of the document property
KEYWORDS
-
getHtmlDescription
String getHtmlDescription()Returns the value of the document property
HTML_DESCRIPTION
.- Usage:
Add description to page's meta information in head.
- Freemarker:
-
<#if self.htmlDescription?has_content> <meta name="description" content="${self.htmlDescription}" /> </#if>
- Returns:
- the value of the document property
HTML_DESCRIPTION
-
getHtmlTitle
String getHtmlTitle()Returns the value of the document property
HTML_TITLE
.- Usage:
Add title to meta information in head.
- Freemarker:
-
<title>${self.htmlTitle!"CoreMedia CMS - No Page Title"}</title>
- Returns:
- the value of the document property
HTML_TITLE
-
getTitle
String getTitle()Returns the title to be used in the head meta data. -
getContexts
Returns the contexts of this CMLinkable.- Returns:
- a list of
CMContext
objects
-
getLocalSettings
com.coremedia.cap.struct.Struct getLocalSettings()Return local settings as a Struct.- Returns:
- local settings. May return null if no settings are found.
-
getLinkedSettings
List<CMSettings> getLinkedSettings()Returns allCMSettings
linked settings.- Returns:
- a
List
ofCMSettings
objects
-
getValidFrom
Calendar getValidFrom()Returns the value of the document propertyVALID_FROM
.- Specified by:
getValidFrom
in interfacecom.coremedia.blueprint.common.datevalidation.ValidityPeriod
- Returns:
- the value of the document property
VALID_FROM
-
getValidTo
Calendar getValidTo()Returns the value of the document propertyVALID_TO
.- Specified by:
getValidTo
in interfacecom.coremedia.blueprint.common.datevalidation.ValidityPeriod
- Returns:
- the value of the document property
VALID_TO
-
getExternallyDisplayedDate
Calendar getExternallyDisplayedDate()Returns the value of the document property
EXTERNALLY_DISPLAYED_DATE
.- Usage:
Display configured external date if available.
- Freemarker:
-
<#if self.externallyDisplayedDate?has_content> <div class="__date"> <@bp.renderDate self.externallyDisplayedDate.time "__time" /> </div> </#if>
- Returns:
- the value of the document property
EXTERNALLY_DISPLAYED_DATE
-
getSubjectTaxonomy
List<CMTaxonomy> getSubjectTaxonomy()Returns the value of the document property
SUBJECT_TAXONOMY
.- Usage:
Add links to subject taxonomy overviews.
- Freemarker:
-
<#assign tags=self.subjectTaxonomy![] /> <#if (tags?size > 0)> <ul> <#list tags as taxonomy> <li> <@cm.include self=taxonomy view="asLink"/> </li> </#list> </ul> </#if>
- JSP:
-
<c:set var="subjectTaxonomy" value="${self.subjectTaxonomy}"/> <c:if test="${not empty subjectTaxonomy}"> <ul> <c:forEach items="${subjectTaxonomy}" var="taxonomy" varStatus="forEachStatus"> <li><cm:include self="${taxonomy}" view="asLink"/></li> </c:forEach> </ul> </c:if>
- Returns:
- a list of
CMTaxonomy
objects
-
getLocationTaxonomy
List<CMLocTaxonomy> getLocationTaxonomy()Returns the value of the document property
LOCATION_TAXONOMY
.- Usage:
Add links to location taxonomy overviews.
- Freemarker:
-
<#assign tags=self.locationTaxonomy![] /> <#if (tags?size > 0)> <ul> <#list tags as taxonomy> <li> <@cm.include self=taxonomy view="asLink"/> </li> </#list> </ul> </#if>
- JSP:
-
<c:set var="locationTaxonomy" value="${self.locationTaxonomy}"/> <c:if test="${not empty locationTaxonomy}"> <ul> <c:forEach items="${locationTaxonomy}" var="taxonomy" varStatus="forEachStatus"> <li><cm:include self="${taxonomy}" view="asLink"/></li> </c:forEach> </ul> </c:if>
- Returns:
- a list of
CMLocTaxonomy
objects
-
getResourceBundles2
List<CMResourceBundle> getResourceBundles2()Returns the value of the document propertyRESOURCE_BUNDLES2
.- Returns:
- a list of
CMResourceBundle
objects
-
isOpenInNewTab
boolean isOpenInNewTab()Always returnsfalse
. This method only serves the purpose to simplify template development. The actual functionality is part ofCMExternalLink
.- Returns:
- always
false
-