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 StringName of the document property 'externallyDisplayedDate'.static final StringName of the document property 'htmlDescription'.static final StringName of the document property 'htmlTitle'.static final StringName of the document property 'keywords'.static final StringName of the document property 'linkedSettings'.static final Stringstatic final StringName of the document property 'locationTaxonomy'.static final StringName of the ContentType'CMLinkable'.static final StringName of the document property 'resourceBundles2'.static final StringName of the document property 'segment'.static final StringName of the document property 'subjectTaxonomy'.static final StringName of the document property 'title'.static final StringName of the document property 'validFrom'.static final StringName of the document property 'validTo'.static final StringName of the document property ' viewtype'.Fields inherited from interface com.coremedia.blueprint.common.contentbeans.CMLocalized
LOCALE, MASTER, MASTER_VERSIONFields 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 allCMSettingslinked settings.Collection<? extends CMLinkable>Returns theLocalespecific variants of thisCMLocalizedcom.coremedia.cap.struct.StructReturn 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 thisCMLocalizedindexed by theirLocaleReturns the first value of the document propertyVIEWTYPE.booleanAlways returnsfalse.Methods inherited from interface com.coremedia.objectserver.dataviews.AssumesIdentity
assumeIdentityMethods inherited from interface com.coremedia.blueprint.common.contentbeans.BelowRootNavigation
getRootNavigationsMethods inherited from interface com.coremedia.blueprint.common.contentbeans.CMLocalized
getCountry, getLang, getLocale, getMasterVersionMethods inherited from interface com.coremedia.blueprint.common.contentbeans.CMObject
getAspectsProvider, getContentId, getUuidMethods inherited from interface com.coremedia.objectserver.beans.ContentBean
getContent, getContentBeanFactoryMethods inherited from interface com.coremedia.blueprint.common.navigation.HasViewTypeName
getViewTypeNameMethods 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:
getMasterin interfaceCMLocalized- Returns:
- a
CMLinkableobject
-
getVariantsByLocale
Map<Locale,? extends CMLinkable> getVariantsByLocale()Description copied from interface:CMLocalizedReturns the variants of thisCMLocalizedindexed by theirLocale- Specified by:
getVariantsByLocalein interfaceCMLocalized- Returns:
- the variants of this
CMLocalizedindexed by theirLocale
-
getLocalizations
Collection<? extends CMLinkable> getLocalizations()Description copied from interface:CMLocalizedReturns the
Localespecific variants of thisCMLocalized- Usage:
Add elements for each variant excluding self (self is of type
Pagein 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:
getLocalizationsin interfaceCMLocalized- Returns:
- the
Localespecific 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:CMObjectReturns 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:
getAspectByNamein interfaceCMLocalized- Specified by:
getAspectByNamein interfaceCMObject- Returns:
- a Map from aspectIDs to Aspects
-
getAspects
Deprecated.since 1907.1; Implement optional features as extensions.Description copied from interface:CMObjectReturns a list of all
Aspectfrom 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:
getAspectsin interfaceCMLocalized- Specified by:
getAspectsin 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.
selfis 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:
getKeywordsin 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
CMContextobjects
-
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 allCMSettingslinked settings.- Returns:
- a
ListofCMSettingsobjects
-
getValidFrom
Calendar getValidFrom()Returns the value of the document propertyVALID_FROM.- Specified by:
getValidFromin 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:
getValidToin 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
CMTaxonomyobjects
-
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
CMLocTaxonomyobjects
-
getResourceBundles2
List<CMResourceBundle> getResourceBundles2()Returns the value of the document propertyRESOURCE_BUNDLES2.- Returns:
- a list of
CMResourceBundleobjects
-
isOpenInNewTab
boolean isOpenInNewTab()Always returnsfalse. This method only serves the purpose to simplify template development. The actual functionality is part ofCMExternalLink.- Returns:
- always
false
-