Class TitleTypeProvider


  • public class TitleTypeProvider
    extends Object
    Simple class to avoid re-implementing the same method in all the Sling models with a title property for which the HTML tag can be configured.
    • Field Detail

      • PN_TITLE_TYPE

        protected static final String PN_TITLE_TYPE
        The component itself uses the titleType property but the policy uses the type property so we can reuse the core/wcm/components/commons/datasources/allowedheadingelements/v1 datasource from the WCM components.
        See Also:
        Constant Field Values
    • Constructor Detail

      • TitleTypeProvider

        public TitleTypeProvider()
    • Method Detail

      • getTitleType

        public static String getTitleType​(com.day.cq.wcm.api.designer.Style currentStyle,
                                          org.apache.sling.api.resource.ValueMap properties)
        Returns the HTML tag type for the title element.
        Parameters:
        currentStyle - The style (policy) of the component.
        properties - The properties of the component.
        Returns:
        The HTML tag type that should be used to display the component title.